mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 13:06:29 +02:00
Merge #9302: Return txid even if ATMP fails for new transaction
b3a7410 Return txid even if ATMP fails for new transaction (Pieter Wuille)
This commit is contained in:
commit
b6abdc77d3
@ -2584,11 +2584,11 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey, CCon
|
|||||||
{
|
{
|
||||||
// Broadcast
|
// Broadcast
|
||||||
if (!wtxNew.AcceptToMemoryPool(maxTxFee, state)) {
|
if (!wtxNew.AcceptToMemoryPool(maxTxFee, state)) {
|
||||||
// This must not fail. The transaction has already been signed and recorded.
|
LogPrintf("CommitTransaction(): Transaction cannot be broadcast immediately, %s\n", state.GetRejectReason());
|
||||||
LogPrintf("CommitTransaction(): Error: Transaction not valid, %s\n", state.GetRejectReason());
|
// TODO: if we expect the failure to be long term or permanent, instead delete wtx from the wallet and return failure.
|
||||||
return false;
|
} else {
|
||||||
|
wtxNew.RelayWalletTransaction(connman);
|
||||||
}
|
}
|
||||||
wtxNew.RelayWalletTransaction(connman);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user