Skip to content

Commit 953544d

Browse files
committed
Merge bitcoin/bitcoin#33429: fuzz: reduce iterations in slow targets
6a33970 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 bitcoin/bitcoin#33425. Addresses bitcoin/bitcoin#32870 as well. ACKs for top commit: Crypt-iQ: crACK 6a33970 dergoegge: utACK 6a33970 enirox001: Concept ACK 6a33970 brunoerg: ACK 6a33970 Tree-SHA512: d03d687507f497e587f7199866266298ca67d9843985dc96d1c957a6fbffb3c6cd5144a4876c471b84c84318295b0438908c745f3a4ac0254dca3e72655ecc14
2 parents df101c9 + 6a33970 commit 953544d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/test/fuzz/mini_miner.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ FUZZ_TARGET(mini_miner, .init = initialize_miner)
5050
std::deque<COutPoint> available_coins = g_available_coins;
5151
LOCK2(::cs_main, pool.cs);
5252
// Cluster size cannot exceed 500
53-
LIMITED_WHILE(!available_coins.empty(), 500)
53+
LIMITED_WHILE(!available_coins.empty(), 100)
5454
{
5555
CMutableTransaction mtx = CMutableTransaction();
5656
const size_t num_inputs = fuzzed_data_provider.ConsumeIntegralInRange<size_t>(1, available_coins.size());

src/test/fuzz/tx_pool.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ FUZZ_TARGET(tx_pool_standard, .init = initialize_tx_pool)
223223
return coin.out.nValue;
224224
};
225225

226-
LIMITED_WHILE(fuzzed_data_provider.ConsumeBool(), 300)
226+
LIMITED_WHILE(fuzzed_data_provider.ConsumeBool(), 100)
227227
{
228228
{
229229
// Total supply is the mempool fee + all outpoints

src/test/fuzz/txdownloadman.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ FUZZ_TARGET(txdownloadman, .init = initialize)
178178

179179
std::chrono::microseconds time{244466666};
180180

181-
LIMITED_WHILE(fuzzed_data_provider.ConsumeBool(), 10000)
181+
LIMITED_WHILE(fuzzed_data_provider.ConsumeBool(), 500)
182182
{
183183
NodeId rand_peer = fuzzed_data_provider.ConsumeIntegralInRange<int64_t>(0, NUM_PEERS - 1);
184184

@@ -303,7 +303,7 @@ FUZZ_TARGET(txdownloadman_impl, .init = initialize)
303303

304304
std::chrono::microseconds time{244466666};
305305

306-
LIMITED_WHILE(fuzzed_data_provider.ConsumeBool(), 10000)
306+
LIMITED_WHILE(fuzzed_data_provider.ConsumeBool(), 500)
307307
{
308308
NodeId rand_peer = fuzzed_data_provider.ConsumeIntegralInRange<int64_t>(0, NUM_PEERS - 1);
309309

0 commit comments

Comments
 (0)