diff options
author | dergoegge <n.goeggi@gmail.com> | 2023-06-03 15:37:11 +0200 |
---|---|---|
committer | dergoegge <n.goeggi@gmail.com> | 2023-06-03 15:37:11 +0200 |
commit | 71200ac390fe5c10f088cbe8053b010b515757b1 (patch) | |
tree | 292088f9666fb1622c86ed99e41045ecd8c012c7 /src | |
parent | 6a560aceb75e618f3106a8850e053cd8de87616a (diff) |
[fuzz] Only check duplicate coinbase script when block was valid
Diffstat (limited to 'src')
-rw-r--r-- | src/test/fuzz/utxo_total_supply.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/fuzz/utxo_total_supply.cpp b/src/test/fuzz/utxo_total_supply.cpp index ea78edd05f..318797faf2 100644 --- a/src/test/fuzz/utxo_total_supply.cpp +++ b/src/test/fuzz/utxo_total_supply.cpp @@ -144,13 +144,13 @@ FUZZ_TARGET(utxo_total_supply) node::RegenerateCommitments(*current_block, chainman); const bool was_valid = !MineBlock(node, current_block).IsNull(); - if (duplicate_coinbase_height == ActiveHeight()) { - // we mined the duplicate coinbase - assert(current_block->vtx.at(0)->vin.at(0).scriptSig == duplicate_coinbase_script); - } - const auto prev_utxo_stats = utxo_stats; if (was_valid) { + if (duplicate_coinbase_height == ActiveHeight()) { + // we mined the duplicate coinbase + assert(current_block->vtx.at(0)->vin.at(0).scriptSig == duplicate_coinbase_script); + } + circulation += GetBlockSubsidy(ActiveHeight(), Params().GetConsensus()); } |