File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -119,7 +119,9 @@ FUZZ_TARGET(utxo_total_supply)
119
119
current_block = PrepareNextBlock ();
120
120
StoreLastTxo ();
121
121
122
- LIMITED_WHILE (fuzzed_data_provider.remaining_bytes (), 100'000 )
122
+ // Limit to avoid timeout, but enough to cover duplicate_coinbase_height
123
+ // and CVE-2018-17144.
124
+ LIMITED_WHILE (fuzzed_data_provider.remaining_bytes (), 2'000 )
123
125
{
124
126
CallOneOf (
125
127
fuzzed_data_provider,
@@ -142,14 +144,14 @@ FUZZ_TARGET(utxo_total_supply)
142
144
node::RegenerateCommitments (*current_block, chainman);
143
145
const bool was_valid = !MineBlock (node, current_block).IsNull ();
144
146
147
+ if (duplicate_coinbase_height == ActiveHeight ()) {
148
+ // we mined the duplicate coinbase
149
+ assert (current_block->vtx .at (0 )->vin .at (0 ).scriptSig == duplicate_coinbase_script);
150
+ }
151
+
145
152
const auto prev_utxo_stats = utxo_stats;
146
153
if (was_valid) {
147
154
circulation += GetBlockSubsidy (ActiveHeight (), Params ().GetConsensus ());
148
-
149
- if (duplicate_coinbase_height == ActiveHeight ()) {
150
- // we mined the duplicate coinbase
151
- assert (current_block->vtx .at (0 )->vin .at (0 ).scriptSig == duplicate_coinbase_script);
152
- }
153
155
}
154
156
155
157
UpdateUtxoStats ();
You can’t perform that action at this time.
0 commit comments