Skip to content

Commit b6abdc7

Browse files
committed
Merge #9302: Return txid even if ATMP fails for new transaction
b3a7410 Return txid even if ATMP fails for new transaction (Pieter Wuille)
2 parents e6ba506 + b3a7410 commit b6abdc7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/wallet/wallet.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2584,11 +2584,11 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey, CCon
25842584
{
25852585
// Broadcast
25862586
if (!wtxNew.AcceptToMemoryPool(maxTxFee, state)) {
2587-
// This must not fail. The transaction has already been signed and recorded.
2588-
LogPrintf("CommitTransaction(): Error: Transaction not valid, %s\n", state.GetRejectReason());
2589-
return false;
2587+
LogPrintf("CommitTransaction(): Transaction cannot be broadcast immediately, %s\n", state.GetRejectReason());
2588+
// TODO: if we expect the failure to be long term or permanent, instead delete wtx from the wallet and return failure.
2589+
} else {
2590+
wtxNew.RelayWalletTransaction(connman);
25902591
}
2591-
wtxNew.RelayWalletTransaction(connman);
25922592
}
25932593
}
25942594
return true;

0 commit comments

Comments
 (0)