Skip to content

Commit 57e337d

Browse files
committed
Merge #9290: Make RelayWalletTransaction attempt to AcceptToMemoryPool.
f692fce Make RelayWalletTransaction attempt to AcceptToMemoryPool. (Gregory Maxwell)
2 parents 47e6a19 + f692fce commit 57e337d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/wallet/wallet.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1542,9 +1542,11 @@ void CWallet::ReacceptWalletTransactions()
15421542
bool CWalletTx::RelayWalletTransaction(CConnman* connman)
15431543
{
15441544
assert(pwallet->GetBroadcastTransactions());
1545-
if (!IsCoinBase())
1545+
if (!IsCoinBase() && !isAbandoned() && GetDepthInMainChain() == 0)
15461546
{
1547-
if (GetDepthInMainChain() == 0 && !isAbandoned() && InMempool()) {
1547+
CValidationState state;
1548+
/* GetDepthInMainChain already catches known conflicts. */
1549+
if (InMempool() || AcceptToMemoryPool(maxTxFee, state)) {
15481550
LogPrintf("Relaying wtx %s\n", GetHash().ToString());
15491551
if (connman) {
15501552
CInv inv(MSG_TX, GetHash());

0 commit comments

Comments
 (0)