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:
1 parent
5321786b9d
commit
596642c5a9
6 files changed
+13
-25
No files matched your search
@@ -1282,7 +1282,7 @@ BOOST_AUTO_TEST_CASE(SelectCoins_effective_value_test)
|
||||
cc.m_allow_other_inputs = false;
|
||||
COutput output = available_coins.All().at(0);
|
||||
cc.SetInputWeight(output.outpoint, 148);
|
||||
cc.SelectExternal(output.outpoint, output.txout);
|
||||
cc.Select(output.outpoint).SetTxOut(output.txout);
|
||||
|
||||
LOCK(wallet->cs_wallet);
|
||||
const auto preset_inputs = *Assert(FetchSelectedInputs(*wallet, cc, cs_params));
|
||||
|
||||
@@ -60,7 +60,7 @@ FUZZ_TARGET(coincontrol, .init = initialize_coincontrol)
|
||||
},
|
||||
[&] {
|
||||
const CTxOut tx_out{ConsumeMoney(fuzzed_data_provider), ConsumeScript(fuzzed_data_provider)};
|
||||
(void)coin_control.SelectExternal(out_point, tx_out);
|
||||
(void)coin_control.Select(out_point).SetTxOut(tx_out);
|
||||
},
|
||||
[&] {
|
||||
(void)coin_control.UnSelect(out_point);
|
||||
|
||||
Reference in new issue
Block a user