mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-24 07:21:22 +02:00
Merge bitcoin/bitcoin#29076: fuzz: set m_fallback_fee
and m_fee_mode
in wallet_fees
target
e03d6f7ed534f423f58236866f8e83beee1871e1 fuzz: set `m_fallback_fee`/`m_fee_mode` in `wallet_fees` target (brunoerg) Pull request description: `m_fallback_fee` and `m_fee_mode` are used in `GetMinimumFeeRate` but we're not setting any value for them in `wallet_fees` target. That's the reason fuzzing is never reaching the following code:  This PR fixes it. ACKs for top commit: maflcko: review ACK e03d6f7ed534f423f58236866f8e83beee1871e1 achow101: ACK e03d6f7ed534f423f58236866f8e83beee1871e1 murchandamus: ACK e03d6f7ed534f423f58236866f8e83beee1871e1 Tree-SHA512: 5d364f5351d65762a3ddf88e3abb7bda401b7e4955285e083031d216fb50082b1ea98e2c065aff75a5a8a3d1bc4c2e5e3ca9f9478d902ee8f8d4347b6cbe53af
This commit is contained in:
commit
c3038bf95a
@ -36,6 +36,10 @@ FUZZ_TARGET(wallet_fees, .init = initialize_setup)
|
||||
wallet.SetLastBlockProcessed(chainstate->m_chain.Height(), chainstate->m_chain.Tip()->GetBlockHash());
|
||||
}
|
||||
|
||||
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)};
|
||||
}
|
||||
@ -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};
|
||||
|
Loading…
x
Reference in New Issue
Block a user