aboutsummaryrefslogtreecommitdiff
path: root/src/test/fuzz
diff options
context:
space:
mode:
authorMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-11-03 20:02:03 +0100
committerMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-11-03 21:16:12 +0100
commitfa7ba926300f44b350d04262e569cc607e4991d8 (patch)
treede0e485383070e688d61a6d9b5ab135c9d9517ef /src/test/fuzz
parentd9007f51a7480246abe4c16f2e3d190988470bec (diff)
fuzz: Avoid utxo_total_supply timeout
Diffstat (limited to 'src/test/fuzz')
-rw-r--r--src/test/fuzz/utxo_total_supply.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/fuzz/utxo_total_supply.cpp b/src/test/fuzz/utxo_total_supply.cpp
index 318797faf2..a8f0f3b7ff 100644
--- a/src/test/fuzz/utxo_total_supply.cpp
+++ b/src/test/fuzz/utxo_total_supply.cpp
@@ -94,8 +94,8 @@ FUZZ_TARGET(utxo_total_supply)
assert(ActiveHeight() == 0);
// Get at which height we duplicate the coinbase
// Assuming that the fuzzer will mine relatively short chains (less than 200 blocks), we want the duplicate coinbase to be not too high.
- // Up to 2000 seems reasonable.
- int64_t duplicate_coinbase_height = fuzzed_data_provider.ConsumeIntegralInRange(0, 20 * COINBASE_MATURITY);
+ // Up to 300 seems reasonable.
+ int64_t duplicate_coinbase_height = fuzzed_data_provider.ConsumeIntegralInRange(0, 300);
// Always pad with OP_0 at the end to avoid bad-cb-length error
const CScript duplicate_coinbase_script = CScript() << duplicate_coinbase_height << OP_0;
// Mine the first block with this duplicate
@@ -121,7 +121,7 @@ FUZZ_TARGET(utxo_total_supply)
// Limit to avoid timeout, but enough to cover duplicate_coinbase_height
// and CVE-2018-17144.
- LIMITED_WHILE(fuzzed_data_provider.remaining_bytes(), 2'000)
+ LIMITED_WHILE(fuzzed_data_provider.remaining_bytes(), 2'00)
{
CallOneOf(
fuzzed_data_provider,