mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-03 09:56:38 -05:00
Merge bitcoin/bitcoin#27810: fuzz: Partially revert #27780
71200ac390
[fuzz] Only check duplicate coinbase script when block was valid (dergoegge) Pull request description: Partially revert #27780, because moving the duplicate coinbase check out of the `was_valid` branch leads to non-bug crashes in the fuzz target. For context and further explanation see: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=59516 ACKs for top commit: MarcoFalke: nice lgtm ACK71200ac390
Tree-SHA512: 8c38e5ff9de6331016b9a0c5e435d007d46186151b04c09085f617bb31627a28ad56678066fe152372a3ad8656f026439e3e2f9ee61d7ef588072aef8124eaa3
This commit is contained in:
commit
2026301405
1 changed files with 5 additions and 5 deletions
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue