aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2016-12-14 01:26:39 -0800
committerPieter Wuille <pieter.wuille@gmail.com>2016-12-14 01:28:09 -0800
commit57e337d40e94ba33d8cd265c134d6ef857b32b59 (patch)
tree29307343f6c1279a549c3990bc351e6c4aba6beb /src/wallet
parent47e6a19e6b57654bbb55a28b1eafa5ea3b8e57c7 (diff)
parentf692fce8a49e05e25f1c767aae1e50db419caebe (diff)
Merge #9290: Make RelayWalletTransaction attempt to AcceptToMemoryPool.
f692fce Make RelayWalletTransaction attempt to AcceptToMemoryPool. (Gregory Maxwell)
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallet.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 6269b4521b..4c6916c04a 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());