mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 02:25:40 +01:00
fuzz: Add coverage for client_maxfeerate
This commit is contained in:
parent
91d7d8f22a
commit
4ba1d0b553
@ -276,8 +276,14 @@ FUZZ_TARGET(tx_package_eval, .init = initialize_tx_pool)
|
||||
// (the package is a test accept and ATMP is a submission).
|
||||
auto single_submit = txs.size() == 1 && fuzzed_data_provider.ConsumeBool();
|
||||
|
||||
// Exercise client_maxfeerate logic
|
||||
std::optional<CFeeRate> client_maxfeerate{};
|
||||
if (fuzzed_data_provider.ConsumeBool()) {
|
||||
client_maxfeerate = CFeeRate(fuzzed_data_provider.ConsumeIntegralInRange<CAmount>(-1, 50 * COIN), 100);
|
||||
}
|
||||
|
||||
const auto result_package = WITH_LOCK(::cs_main,
|
||||
return ProcessNewPackage(chainstate, tx_pool, txs, /*test_accept=*/single_submit, /*client_maxfeerate=*/{}));
|
||||
return ProcessNewPackage(chainstate, tx_pool, txs, /*test_accept=*/single_submit, client_maxfeerate));
|
||||
|
||||
// Always set bypass_limits to false because it is not supported in ProcessNewPackage and
|
||||
// can be a source of divergence.
|
||||
|
Loading…
Reference in New Issue
Block a user