Merge bitcoin/bitcoin#32859: functional test: correctly detect nonstd TRUC tx vsize in feature_taproot
f0524cda39functional test: correctly detect nonstd TRUC tx vsize in feature_taproot (Greg Sanders) Pull request description: Resolves https://github.com/bitcoin/bitcoin/pull/32841#discussion_r2180240391 ACKs for top commit: davidgumberg: utACK https://github.com/bitcoin/bitcoin/commit/f0524cda3995cf65adab3d0ca8da0dee4e31c79b achow101: ACKf0524cda39darosior: utACKf0524cda39w0xlt: ACK https://github.com/bitcoin/bitcoin/pull/32859/commits/f0524cda3995cf65adab3d0ca8da0dee4e31c79b Tree-SHA512: b803c94f7a683b51bab88ae788384ff484a3e6597153bf022263bbc9531dd3faebb7832db26f2b8b4c0d0337c59991d0beca167def5aebe3e9a5d8a9bfdaaba5
This commit is contained in:
1 file changed
+4
-1
@@ -644,6 +644,7 @@ MIN_FEE = 50000
|
|||||||
|
|
||||||
TX_MAX_STANDARD_VERSION = 3
|
TX_MAX_STANDARD_VERSION = 3
|
||||||
TX_STANDARD_VERSIONS = [1, 2, TX_MAX_STANDARD_VERSION]
|
TX_STANDARD_VERSIONS = [1, 2, TX_MAX_STANDARD_VERSION]
|
||||||
|
TRUC_MAX_VSIZE = 10000 # test doesn't cover in-mempool spends, so only this limit is hit
|
||||||
|
|
||||||
# === Actual test cases ===
|
# === Actual test cases ===
|
||||||
|
|
||||||
@@ -1538,7 +1539,9 @@ class TaprootTest(BitcoinTestFramework):
|
|||||||
is_standard_tx = (
|
is_standard_tx = (
|
||||||
fail_input is None # Must be valid to be standard
|
fail_input is None # Must be valid to be standard
|
||||||
and (all(utxo.spender.is_standard for utxo in input_utxos)) # All inputs must be standard
|
and (all(utxo.spender.is_standard for utxo in input_utxos)) # All inputs must be standard
|
||||||
and tx.version in TX_STANDARD_VERSIONS) # The tx version must be standard
|
and tx.version in TX_STANDARD_VERSIONS # The tx version must be standard
|
||||||
|
and not (tx.version == 3 and tx.get_vsize() > TRUC_MAX_VSIZE) # Topological standardness rules must be followed
|
||||||
|
)
|
||||||
msg = ','.join(utxo.spender.comment + ("*" if n == fail_input else "") for n, utxo in enumerate(input_utxos))
|
msg = ','.join(utxo.spender.comment + ("*" if n == fail_input else "") for n, utxo in enumerate(input_utxos))
|
||||||
if is_standard_tx:
|
if is_standard_tx:
|
||||||
node.sendrawtransaction(tx.serialize().hex(), 0)
|
node.sendrawtransaction(tx.serialize().hex(), 0)
|
||||||
|
|||||||
Reference in new issue
Block a user