mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user