mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
doc: warn that CheckBlock() underestimates sigops
Counting sigops in the witness requires context that CheckBlock() does not have, so it only counts sigops for non-segwit transactions. It's useful to document, but it should not be a problem.
This commit is contained in:
parent
66aa6a47bd
commit
0ac19a98f3
1 changed files with 1 additions and 0 deletions
|
@ -4094,6 +4094,7 @@ bool CheckBlock(const CBlock& block, BlockValidationState& state, const Consensu
|
|||
strprintf("Transaction check failed (tx hash %s) %s", tx->GetHash().ToString(), tx_state.GetDebugMessage()));
|
||||
}
|
||||
}
|
||||
// This underestimates the number of sigops, because unlike ConnectBlock it does not count the witness:
|
||||
unsigned int nSigOps = 0;
|
||||
for (const auto& tx : block.vtx)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue