qa: functional test a transaction running into the legacy sigop limit

It's useful to have an end-to-end test in addition to the unit test to sanity check the RPC error as
well as making sure the transaction is otherwise fully standard.

Github-Pull: bitcoin/bitcoin#32521
Rebased-From: 96da68a38f
This commit is contained in:
Antoine Poinsot
2025-03-20 09:44:10 -04:00
parent 0a4671d5eb
commit 313023369b
2 changed files with 51 additions and 0 deletions

View File

@@ -22,6 +22,12 @@ from test_framework.script import (
sha256,
)
# Maximum number of potentially executed legacy signature operations in validating a transaction.
MAX_STD_LEGACY_SIGOPS = 2_500
# Maximum number of sigops per standard P2SH redeemScript.
MAX_STD_P2SH_SIGOPS = 15
# To prevent a "tx-size-small" policy rule error, a transaction has to have a
# non-witness size of at least 65 bytes (MIN_STANDARD_TX_NONWITNESS_SIZE in
# src/policy/policy.h). Considering a Tx with the smallest possible single