Skip to content

Commit b3a7410

Browse files
committed
Return txid even if ATMP fails for new transaction
1 parent 8601784 commit b3a7410

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
@@ -2580,11 +2580,11 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey, CCon
25802580
{
25812581
// Broadcast
25822582
if (!wtxNew.AcceptToMemoryPool(maxTxFee, state)) {
2583-
// This must not fail. The transaction has already been signed and recorded.
2584-
LogPrintf("CommitTransaction(): Error: Transaction not valid, %s\n", state.GetRejectReason());
2585-
return false;
2583+
LogPrintf("CommitTransaction(): Transaction cannot be broadcast immediately, %s\n", state.GetRejectReason());
2584+
// TODO: if we expect the failure to be long term or permanent, instead delete wtx from the wallet and return failure.
2585+
} else {
2586+
wtxNew.RelayWalletTransaction(connman);
25862587
}
2587-
wtxNew.RelayWalletTransaction(connman);
25882588
}
25892589
}
25902590
return true;

0 commit comments

Comments
 (0)