Skip to content

Commit fa7ba92

Browse files
author
MarcoFalke
committed
fuzz: Avoid utxo_total_supply timeout
1 parent d9007f5 commit fa7ba92

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/test/fuzz/utxo_total_supply.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ FUZZ_TARGET(utxo_total_supply)
9494
assert(ActiveHeight() == 0);
9595
// Get at which height we duplicate the coinbase
9696
// Assuming that the fuzzer will mine relatively short chains (less than 200 blocks), we want the duplicate coinbase to be not too high.
97-
// Up to 2000 seems reasonable.
98-
int64_t duplicate_coinbase_height = fuzzed_data_provider.ConsumeIntegralInRange(0, 20 * COINBASE_MATURITY);
97+
// Up to 300 seems reasonable.
98+
int64_t duplicate_coinbase_height = fuzzed_data_provider.ConsumeIntegralInRange(0, 300);
9999
// Always pad with OP_0 at the end to avoid bad-cb-length error
100100
const CScript duplicate_coinbase_script = CScript() << duplicate_coinbase_height << OP_0;
101101
// Mine the first block with this duplicate
@@ -121,7 +121,7 @@ FUZZ_TARGET(utxo_total_supply)
121121

122122
// Limit to avoid timeout, but enough to cover duplicate_coinbase_height
123123
// and CVE-2018-17144.
124-
LIMITED_WHILE(fuzzed_data_provider.remaining_bytes(), 2'000)
124+
LIMITED_WHILE(fuzzed_data_provider.remaining_bytes(), 2'00)
125125
{
126126
CallOneOf(
127127
fuzzed_data_provider,

0 commit comments

Comments
 (0)