diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-12-13 12:15:25 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-12-13 12:15:27 +0100 |
commit | b6abdc77d39c239e3915b3ffa73f2a2e0cfccd4b (patch) | |
tree | d1b45a2c4fcfe39073466ca06f500ccbd6c836d4 /src/wallet/wallet.cpp | |
parent | e6ba5068f107ac234576e77cedbd748b665369c2 (diff) | |
parent | b3a74100b86423c553ac327f3ea6fdbc2c50890a (diff) | |
download | bitcoin-b6abdc77d39c239e3915b3ffa73f2a2e0cfccd4b.tar.xz |
Merge #9302: Return txid even if ATMP fails for new transaction
b3a7410 Return txid even if ATMP fails for new transaction (Pieter Wuille)
Diffstat (limited to 'src/wallet/wallet.cpp')
-rw-r--r-- | src/wallet/wallet.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 00e97d3c7f..6269b4521b 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2584,11 +2584,11 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey, CCon { // Broadcast if (!wtxNew.AcceptToMemoryPool(maxTxFee, state)) { - // This must not fail. The transaction has already been signed and recorded. - LogPrintf("CommitTransaction(): Error: Transaction not valid, %s\n", state.GetRejectReason()); - return false; + LogPrintf("CommitTransaction(): Transaction cannot be broadcast immediately, %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. + } else { + wtxNew.RelayWalletTransaction(connman); } - wtxNew.RelayWalletTransaction(connman); } } return true; |