mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-15 16:38:23 +01:00
test: properly check for per-tx sigops limit
Currently the per-tx sigops limit standardness check (bounded by `MAX_STANDARD_TX_SIGOPS_COST`, throwing "bad-txns-too-many-sigops" if exceeded) is only indirectly tested with the much higher per-block consensus limit (`MAX_BLOCK_SIGOPS_COST`), i.e. an increase in the limit would still pass all tests. Refine that by splitting up the invalid tx template `TooManySigops` in a per-block and a per-tx one. The involved functional tests taking use of these templates are `feature_block.py` and `p2p_invalid_txs.py`.
This commit is contained in:
@@ -49,6 +49,7 @@ from .util import assert_equal
|
||||
|
||||
MAX_BLOCK_SIGOPS = 20000
|
||||
MAX_BLOCK_SIGOPS_WEIGHT = MAX_BLOCK_SIGOPS * WITNESS_SCALE_FACTOR
|
||||
MAX_STANDARD_TX_SIGOPS = 4000
|
||||
MAX_STANDARD_TX_WEIGHT = 400000
|
||||
|
||||
# Genesis block time (regtest)
|
||||
|
||||
Reference in New Issue
Block a user