mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
[wallet] Remove state argument from CWallet::CommitTransaction
The `state` return argument has not been set since commit 611291c198.
Remove it (and the one place that it's used in a calling function).
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <consensus/validation.h>
|
||||
#include <interfaces/chain.h>
|
||||
#include <wallet/coincontrol.h>
|
||||
#include <wallet/feebumper.h>
|
||||
@@ -393,17 +392,10 @@ Result CommitTransaction(CWallet& wallet, const uint256& txid, CMutableTransacti
|
||||
mapValue_t mapValue = oldWtx.mapValue;
|
||||
mapValue["replaces_txid"] = oldWtx.GetHash().ToString();
|
||||
|
||||
CValidationState state;
|
||||
wallet.CommitTransaction(tx, std::move(mapValue), oldWtx.vOrderForm, state);
|
||||
|
||||
bumped_txid = tx->GetHash();
|
||||
if (state.IsInvalid()) {
|
||||
// This can happen if the mempool rejected the transaction. Report
|
||||
// what happened in the "errors" response.
|
||||
errors.push_back(strprintf("Error: The transaction was rejected: %s", FormatStateMessage(state)));
|
||||
}
|
||||
wallet.CommitTransaction(tx, std::move(mapValue), oldWtx.vOrderForm);
|
||||
|
||||
// mark the original tx as bumped
|
||||
bumped_txid = tx->GetHash();
|
||||
if (!wallet.MarkReplaced(oldWtx.GetHash(), bumped_txid)) {
|
||||
// TODO: see if JSON-RPC has a standard way of returning a response
|
||||
// along with an exception. It would be good to return information about
|
||||
|
||||
Reference in New Issue
Block a user