diff options
author | John Newbery <john@johnnewbery.com> | 2019-04-03 17:55:24 -0400 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2019-10-18 09:26:32 -0400 |
commit | d1734f9a3b138ab046f38ee44a09bc3847bf938a (patch) | |
tree | 172eb76ab4c70e926fe292d8e535cae48ee879fc /src/wallet/feebumper.cpp | |
parent | b6f486a02b463ffeaf82ec11fc6f74f439c037ae (diff) |
[wallet] Remove return value from CommitTransaction()
CommitTransaction returns a bool to indicate success, but since commit
b3a74100b8 it only returns true, even if the transaction was not
successfully broadcast. This commit changes CommitTransaction() to return
void.
All dead code in `if (!CommitTransaction())` branches has been removed.
Diffstat (limited to 'src/wallet/feebumper.cpp')
-rw-r--r-- | src/wallet/feebumper.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/wallet/feebumper.cpp b/src/wallet/feebumper.cpp index fbcf8d4de7..c9cd042b03 100644 --- a/src/wallet/feebumper.cpp +++ b/src/wallet/feebumper.cpp @@ -394,11 +394,7 @@ Result CommitTransaction(CWallet& wallet, const uint256& txid, CMutableTransacti mapValue["replaces_txid"] = oldWtx.GetHash().ToString(); CValidationState state; - if (!wallet.CommitTransaction(tx, std::move(mapValue), oldWtx.vOrderForm, state)) { - // NOTE: CommitTransaction never returns false, so this should never happen. - errors.push_back(strprintf("The transaction was rejected: %s", FormatStateMessage(state))); - return Result::WALLET_ERROR; - } + wallet.CommitTransaction(tx, std::move(mapValue), oldWtx.vOrderForm, state); bumped_txid = tx->GetHash(); if (state.IsInvalid()) { |