@@ -46,14 +46,12 @@ def run_test(self):
46
46
print ("Running test BIP68 not consensus before versionbits activation" )
47
47
self .test_bip68_not_consensus ()
48
48
49
- print ("Verifying nVersion=2 transactions aren't standard" )
50
- self .test_version2_relay (before_activation = True )
51
-
52
49
print ("Activating BIP68 (and 112/113)" )
53
50
self .activateCSV ()
54
51
55
- print ("Verifying nVersion=2 transactions are now standard" )
56
- self .test_version2_relay (before_activation = False )
52
+ print ("Verifying nVersion=2 transactions are standard." )
53
+ print ("Note that with current versions of bitcoin software, nVersion=2 transactions are always standard (independent of BIP68 activation status)." )
54
+ self .test_version2_relay ()
57
55
58
56
print ("Passed\n " )
59
57
@@ -403,21 +401,16 @@ def activateCSV(self):
403
401
assert (get_bip9_status (self .nodes [0 ], 'csv' )['status' ] == 'active' )
404
402
sync_blocks (self .nodes )
405
403
406
- # Use self.nodes[1] to test standardness relay policy
407
- def test_version2_relay (self , before_activation ):
404
+ # Use self.nodes[1] to test that version 2 transactions are standard.
405
+ def test_version2_relay (self ):
408
406
inputs = [ ]
409
407
outputs = { self .nodes [1 ].getnewaddress () : 1.0 }
410
408
rawtx = self .nodes [1 ].createrawtransaction (inputs , outputs )
411
409
rawtxfund = self .nodes [1 ].fundrawtransaction (rawtx )['hex' ]
412
410
tx = FromHex (CTransaction (), rawtxfund )
413
411
tx .nVersion = 2
414
412
tx_signed = self .nodes [1 ].signrawtransaction (ToHex (tx ))["hex" ]
415
- try :
416
- tx_id = self .nodes [1 ].sendrawtransaction (tx_signed )
417
- assert (before_activation == False )
418
- except :
419
- assert (before_activation )
420
-
413
+ tx_id = self .nodes [1 ].sendrawtransaction (tx_signed )
421
414
422
415
if __name__ == '__main__' :
423
416
BIP68Test ().main ()
0 commit comments