From 0fab6dc7aa110a6efbe497e153536b3d862b9140 Mon Sep 17 00:00:00 2001 From: Gregory Maxwell Date: Tue, 6 Dec 2016 06:39:14 +0000 Subject: [PATCH] Make RelayWalletTransaction attempt to AcceptToMemoryPool. --- src/wallet/wallet.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index b2d668b8d..f22d04527 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1831,9 +1831,10 @@ void CWallet::ReacceptWalletTransactions() bool CWalletTx::RelayWalletTransaction() { assert(pwallet->GetBroadcastTransactions()); - if (!IsCoinBase() && !IsCoinStake()) + if (!(IsCoinBase() || IsCoinStake()) && !isAbandoned() && GetDepthInMainChain() == 0) { - if (GetDepthInMainChain() == 0 && !isAbandoned() && InMempool()) { + /* GetDepthInMainChain already catches known conflicts. */ + if (InMempool() || AcceptToMemoryPool(false, maxTxFee)) { LogPrintf("Relaying wtx %s\n", GetHash().ToString()); CFeeRate feeRate; mempool.lookupFeeRate(GetHash(), feeRate);