17void initialize_coincontrol()
20 g_setup = testing_setup.get();
30 args.
ForceSetArg(
"-avoidpartialspends", fuzzed_data_provider.ConsumeBool()?
"1":
"0");
32 CCoinControl coin_control;
41 if (!optional_out_point) {
44 out_point = *optional_out_point;
47 (void)coin_control.HasSelected();
50 (void)coin_control.IsSelected(out_point);
53 (void)coin_control.IsExternalSelected(out_point);
56 (void)coin_control.GetExternalOutput(out_point);
59 (void)coin_control.Select(out_point);
63 (void)coin_control.Select(out_point).SetTxOut(tx_out);
66 (void)coin_control.UnSelect(out_point);
69 (void)coin_control.UnSelectAll();
72 (void)coin_control.ListSelected();
75 int64_t weight{fuzzed_data_provider.ConsumeIntegral<int64_t>()};
76 (void)coin_control.SetInputWeight(out_point, weight);
79 (void)coin_control.GetInputWeight(out_point);
void ForceSetArg(const std::string &strArg, const std::string &strValue)
An outpoint - a combination of a transaction hash and an index n into its vout.
An output of a transaction.
#define LIMITED_WHILE(condition, limit)
Can be used to limit a theoretically unbounded loop.
std::unique_ptr< T > MakeNoLogFileContext(const ChainType chain_type=ChainType::REGTEST, TestOpts opts={})
Make a test setup that has disk access to the debug.log file disabled.
Testing setup that configures a complete environment.
CScript ConsumeScript(FuzzedDataProvider &fuzzed_data_provider, const bool maybe_p2wsh) noexcept
CAmount ConsumeMoney(FuzzedDataProvider &fuzzed_data_provider, const std::optional< CAmount > &max) noexcept
size_t CallOneOf(FuzzedDataProvider &fuzzed_data_provider, Callables... callables)
std::optional< T > ConsumeDeserializable(FuzzedDataProvider &fuzzed_data_provider, const P ¶ms, const std::optional< size_t > &max_length=std::nullopt) noexcept