diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2016-12-08 11:49:28 -0800 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2016-12-08 11:55:32 -0800 |
commit | b3a74100b86423c553ac327f3ea6fdbc2c50890a (patch) | |
tree | 7afe09cb41e699d85d5ba3d255d2f8adfe32c6db /src/wallet | |
parent | 86017842d6ef6c57f1e06ed395afecf11d71a650 (diff) |
Return txid even if ATMP fails for new transaction
Diffstat (limited to 'src/wallet')
-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 638fca9917..11ce06c99d 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2580,11 +2580,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; |