diff options
| author | Pieter Wuille <[email protected]> | 2016-12-14 01:26:39 -0800 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2016-12-14 01:28:09 -0800 |
| commit | 57e337d40e94ba33d8cd265c134d6ef857b32b59 (patch) | |
| tree | 29307343f6c1279a549c3990bc351e6c4aba6beb /src/wallet/wallet.cpp | |
| parent | Merge #9330: [Qt] Console: add security warning (diff) | |
| parent | Make RelayWalletTransaction attempt to AcceptToMemoryPool. (diff) | |
| download | discoin-57e337d40e94ba33d8cd265c134d6ef857b32b59.tar.xz discoin-57e337d40e94ba33d8cd265c134d6ef857b32b59.zip | |
Merge #9290: Make RelayWalletTransaction attempt to AcceptToMemoryPool.
f692fce Make RelayWalletTransaction attempt to AcceptToMemoryPool. (Gregory Maxwell)
Diffstat (limited to 'src/wallet/wallet.cpp')
| -rw-r--r-- | src/wallet/wallet.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 6269b4521..4c6916c04 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1542,9 +1542,11 @@ void CWallet::ReacceptWalletTransactions() bool CWalletTx::RelayWalletTransaction(CConnman* connman) { assert(pwallet->GetBroadcastTransactions()); - if (!IsCoinBase()) + if (!IsCoinBase() && !isAbandoned() && GetDepthInMainChain() == 0) { - if (GetDepthInMainChain() == 0 && !isAbandoned() && InMempool()) { + CValidationState state; + /* GetDepthInMainChain already catches known conflicts. */ + if (InMempool() || AcceptToMemoryPool(maxTxFee, state)) { LogPrintf("Relaying wtx %s\n", GetHash().ToString()); if (connman) { CInv inv(MSG_TX, GetHash()); |