diff options
author | brunoerg <brunoely.gc@gmail.com> | 2023-12-13 10:02:34 -0300 |
---|---|---|
committer | brunoerg <brunoely.gc@gmail.com> | 2023-12-13 18:20:10 -0300 |
commit | e03d6f7ed534f423f58236866f8e83beee1871e1 (patch) | |
tree | d3a19f3db9bce63ecf7e0e94ab3e0c47e45d577a /src/wallet/test | |
parent | f0e829022a415c7c9513e715c532079ec7756306 (diff) | |
download | bitcoin-e03d6f7ed534f423f58236866f8e83beee1871e1.tar.xz |
fuzz: set `m_fallback_fee`/`m_fee_mode` in `wallet_fees` target
Diffstat (limited to 'src/wallet/test')
-rw-r--r-- | src/wallet/test/fuzz/fees.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/wallet/test/fuzz/fees.cpp b/src/wallet/test/fuzz/fees.cpp index 2f7892dc0a..c2e785651a 100644 --- a/src/wallet/test/fuzz/fees.cpp +++ b/src/wallet/test/fuzz/fees.cpp @@ -37,6 +37,10 @@ FUZZ_TARGET(wallet_fees, .init = initialize_setup) } if (fuzzed_data_provider.ConsumeBool()) { + wallet.m_fallback_fee = CFeeRate{ConsumeMoney(fuzzed_data_provider, /*max=*/COIN)}; + } + + if (fuzzed_data_provider.ConsumeBool()) { wallet.m_discard_rate = CFeeRate{ConsumeMoney(fuzzed_data_provider, /*max=*/COIN)}; } (void)GetDiscardRate(wallet); @@ -58,6 +62,9 @@ FUZZ_TARGET(wallet_fees, .init = initialize_setup) if (fuzzed_data_provider.ConsumeBool()) { coin_control.m_confirm_target = fuzzed_data_provider.ConsumeIntegralInRange<unsigned int>(0, 999'000); } + if (fuzzed_data_provider.ConsumeBool()) { + coin_control.m_fee_mode = fuzzed_data_provider.ConsumeBool() ? FeeEstimateMode::CONSERVATIVE : FeeEstimateMode::ECONOMICAL; + } FeeCalculation fee_calculation; FeeCalculation* maybe_fee_calculation{fuzzed_data_provider.ConsumeBool() ? nullptr : &fee_calculation}; |