Sergio Demian Lerner via bitcoin-dev
2016-03-21 02:50:55 UTC
The BIP147 reads:
*Sigop cost* is defined. The cost of a sigop in traditional script is 4,
while the cost of a sigop in witness program is 1.
The new rule is total *sigop cost* †80,000.
But the code implements:
if (nSigOps + (nWitSigOps + 3) / 4 > MAX_BLOCK_SIGOPS)
... error....
Which is not the same.
For example:
nSigOps = 1
nWitSigOps =79999
Is not an error by BIP definition but it's an error by the implemented code.
Regards, Sergio.
*Sigop cost* is defined. The cost of a sigop in traditional script is 4,
while the cost of a sigop in witness program is 1.
The new rule is total *sigop cost* †80,000.
But the code implements:
if (nSigOps + (nWitSigOps + 3) / 4 > MAX_BLOCK_SIGOPS)
... error....
Which is not the same.
For example:
nSigOps = 1
nWitSigOps =79999
Is not an error by BIP definition but it's an error by the implemented code.
Regards, Sergio.