Skip to content

Commit d0db70b

Browse files
laanwjcodablock
authored andcommitted
Merge bitcoin#9302: Return txid even if ATMP fails for new transaction
b3a7410 Return txid even if ATMP fails for new transaction (Pieter Wuille)
1 parent c0b0ae8 commit d0db70b

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
@@ -3724,11 +3724,11 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey, CCon
37243724
{
37253725
// Broadcast
37263726
if (!wtxNew.AcceptToMemoryPool(maxTxFee, state)) {
3727-
// This must not fail. The transaction has already been signed and recorded.
3728-
LogPrintf("CommitTransaction(): Error: Transaction not valid, %s\n", state.GetRejectReason());
3729-
return false;
3727+
LogPrintf("CommitTransaction(): Transaction cannot be broadcast immediately, %s\n", state.GetRejectReason());
3728+
// TODO: if we expect the failure to be long term or permanent, instead delete wtx from the wallet and return failure.
3729+
} else {
3730+
wtxNew.RelayWalletTransaction(connman, strCommand);
37303731
}
3731-
wtxNew.RelayWalletTransaction(connman, strCommand);
37323732
}
37333733
}
37343734
return true;

0 commit comments

Comments
 (0)