File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -122,7 +122,9 @@ FUZZ_TARGET(utxo_total_supply)
122122 current_block = PrepareNextBlock ();
123123 StoreLastTxo ();
124124
125- LIMITED_WHILE (fuzzed_data_provider.remaining_bytes (), 100'000 )
125+ // Limit to avoid timeout, but enough to cover duplicate_coinbase_height
126+ // and CVE-2018-17144.
127+ LIMITED_WHILE (fuzzed_data_provider.remaining_bytes (), 2'000 )
126128 {
127129 CallOneOf (
128130 fuzzed_data_provider,
@@ -145,14 +147,14 @@ FUZZ_TARGET(utxo_total_supply)
145147 current_block->hashMerkleRoot = BlockMerkleRoot (*current_block);
146148 const bool was_valid = !MineBlock (node, current_block).IsNull ();
147149
150+ if (duplicate_coinbase_height == ActiveHeight ()) {
151+ // we mined the duplicate coinbase
152+ assert (current_block->vtx .at (0 )->vin .at (0 ).scriptSig == duplicate_coinbase_script);
153+ }
154+
148155 const auto prev_utxo_stats = utxo_stats;
149156 if (was_valid) {
150157 circulation += GetBlockSubsidy (ActiveTip (), Params ().GetConsensus ());
151-
152- if (duplicate_coinbase_height == ActiveHeight ()) {
153- // we mined the duplicate coinbase
154- assert (current_block->vtx .at (0 )->vin .at (0 ).scriptSig == duplicate_coinbase_script);
155- }
156158 }
157159
158160 UpdateUtxoStats ();
You can’t perform that action at this time.
0 commit comments