Merge bitcoin/bitcoin#33429: fuzz: reduce iterations in slow targets

6a33970fef fuzz: Reduce iterations in slow targets (marcofleon)

Pull request description:

  The `mini_miner`, `txdownloadman`, `txdownloadman_impl`, and `tx_pool_standard` fuzz targets are all slow-running targets. Fix this by reducing the iteration count in the `LIMITED_WHILE` loops.

  This should help decrease the run time of the fuzz CI jobs. See https://github.com/bitcoin/bitcoin/pull/33425.

  Addresses https://github.com/bitcoin/bitcoin/issues/32870 as well.

ACKs for top commit:
  Crypt-iQ:
    crACK 6a33970fef
  dergoegge:
    utACK 6a33970fef
  enirox001:
    Concept ACK 6a33970
  brunoerg:
    ACK 6a33970fef

Tree-SHA512: d03d687507f497e587f7199866266298ca67d9843985dc96d1c957a6fbffb3c6cd5144a4876c471b84c84318295b0438908c745f3a4ac0254dca3e72655ecc14
This commit is contained in:
merge-script
2025-09-20 14:53:31 +01:00
3 changed files with 4 additions and 4 deletions

View File

@@ -50,7 +50,7 @@ FUZZ_TARGET(mini_miner, .init = initialize_miner)
std::deque<COutPoint> available_coins = g_available_coins;
LOCK2(::cs_main, pool.cs);
// Cluster size cannot exceed 500
LIMITED_WHILE(!available_coins.empty(), 500)
LIMITED_WHILE(!available_coins.empty(), 100)
{
CMutableTransaction mtx = CMutableTransaction();
const size_t num_inputs = fuzzed_data_provider.ConsumeIntegralInRange<size_t>(1, available_coins.size());

View File

@@ -223,7 +223,7 @@ FUZZ_TARGET(tx_pool_standard, .init = initialize_tx_pool)
return coin.out.nValue;
};
LIMITED_WHILE(fuzzed_data_provider.ConsumeBool(), 300)
LIMITED_WHILE(fuzzed_data_provider.ConsumeBool(), 100)
{
{
// Total supply is the mempool fee + all outpoints

View File

@@ -178,7 +178,7 @@ FUZZ_TARGET(txdownloadman, .init = initialize)
std::chrono::microseconds time{244466666};
LIMITED_WHILE(fuzzed_data_provider.ConsumeBool(), 10000)
LIMITED_WHILE(fuzzed_data_provider.ConsumeBool(), 500)
{
NodeId rand_peer = fuzzed_data_provider.ConsumeIntegralInRange<int64_t>(0, NUM_PEERS - 1);
@@ -303,7 +303,7 @@ FUZZ_TARGET(txdownloadman_impl, .init = initialize)
std::chrono::microseconds time{244466666};
LIMITED_WHILE(fuzzed_data_provider.ConsumeBool(), 10000)
LIMITED_WHILE(fuzzed_data_provider.ConsumeBool(), 500)
{
NodeId rand_peer = fuzzed_data_provider.ConsumeIntegralInRange<int64_t>(0, NUM_PEERS - 1);