aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/feebumper.cpp
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2022-06-20 12:03:03 -0400
committerAndrew Chow <github@achow101.com>2023-12-08 14:55:14 -0500
commit596642c5a9f52dda2599b0bde424366bb22b3c6e (patch)
treec4636f73d25fadf81507374125348fda18805cc3 /src/wallet/feebumper.cpp
parent5321786b9d90eaf35059bb07e6beaaa2cbb257ac (diff)
downloadbitcoin-596642c5a9f52dda2599b0bde424366bb22b3c6e.tar.xz
wallet: Replace SelectExternal with SetTxOut
Instead of having a separate CCoinControl::SelectExternal function, we can use the normal CCoinControl::Select function and explicitly use PreselectedInput::SetTxOut in the caller. The semantics of what an external input is remains.
Diffstat (limited to 'src/wallet/feebumper.cpp')
-rw-r--r--src/wallet/feebumper.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/wallet/feebumper.cpp b/src/wallet/feebumper.cpp
index d9a08310a8..d3df9ceeff 100644
--- a/src/wallet/feebumper.cpp
+++ b/src/wallet/feebumper.cpp
@@ -203,10 +203,9 @@ Result CreateRateBumpTransaction(CWallet& wallet, const uint256& txid, const CCo
errors.push_back(Untranslated(strprintf("%s:%u is already spent", txin.prevout.hash.GetHex(), txin.prevout.n)));
return Result::MISC_ERROR;
}
- if (wallet.IsMine(txin.prevout)) {
- new_coin_control.Select(txin.prevout);
- } else {
- new_coin_control.SelectExternal(txin.prevout, coin.out);
+ PreselectedInput& preset_txin = new_coin_control.Select(txin.prevout);
+ if (!wallet.IsMine(txin.prevout)) {
+ preset_txin.SetTxOut(coin.out);
}
input_value += coin.out.nValue;
spent_outputs.push_back(coin.out);