35
35
NULLDUMMY_ERROR = "non-mandatory-script-verify-flag (Dummy CHECKMULTISIG argument must be zero)"
36
36
37
37
38
- def trueDummy (tx ):
38
+ def invalidate_nulldummy_tx (tx ):
39
39
"""Transform a NULLDUMMY compliant tx (i.e. scriptSig starts with OP_0)
40
40
to be non-NULLDUMMY compliant by replacing the dummy with OP_TRUE"""
41
41
assert_equal (tx .vin [0 ].scriptSig [0 ], OP_0 )
@@ -92,7 +92,7 @@ def run_test(self):
92
92
93
93
self .log .info ("Test 2: Non-NULLDUMMY base multisig transaction should not be accepted to mempool before activation" )
94
94
test2tx = create_transaction (self .nodes [0 ], txid2 , self .ms_address , amount = 47 )
95
- trueDummy (test2tx )
95
+ invalidate_nulldummy_tx (test2tx )
96
96
assert_raises_rpc_error (- 26 , NULLDUMMY_ERROR , self .nodes [0 ].sendrawtransaction , test2tx .serialize_with_witness ().hex (), 0 )
97
97
98
98
self .log .info (f"Test 3: Non-NULLDUMMY base transactions should be accepted in a block before activation [{ COINBASE_MATURITY + 4 } ]" )
@@ -101,7 +101,7 @@ def run_test(self):
101
101
self .log .info ("Test 4: Non-NULLDUMMY base multisig transaction is invalid after activation" )
102
102
test4tx = create_transaction (self .nodes [0 ], test2tx .hash , self .address , amount = 46 )
103
103
test6txs = [CTransaction (test4tx )]
104
- trueDummy (test4tx )
104
+ invalidate_nulldummy_tx (test4tx )
105
105
assert_raises_rpc_error (- 26 , NULLDUMMY_ERROR , self .nodes [0 ].sendrawtransaction , test4tx .serialize_with_witness ().hex (), 0 )
106
106
self .block_submit (self .nodes [0 ], [test4tx ], accept = False )
107
107
0 commit comments