[fuzz] Only check duplicate coinbase script when block was valid
This commit is contained in:
1 parent
6a560aceb7
commit
71200ac390
1 file changed
+5
-5
@@ -144,13 +144,13 @@ FUZZ_TARGET(utxo_total_supply)
|
|||||||
node::RegenerateCommitments(*current_block, chainman);
|
node::RegenerateCommitments(*current_block, chainman);
|
||||||
const bool was_valid = !MineBlock(node, current_block).IsNull();
|
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;
|
const auto prev_utxo_stats = utxo_stats;
|
||||||
if (was_valid) {
|
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());
|
circulation += GetBlockSubsidy(ActiveHeight(), Params().GetConsensus());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user