@@ -53,38 +53,38 @@ def test_activation(self, rpc, activation_height):
53
53
blocks = self .generatetoaddress (rpc , 127 , rpc .getnewaddress ())
54
54
for n , block in enumerate (blocks ):
55
55
decode = rpc .getblockheader (block )
56
- assert_equal (decode ["versionHex" ], "21000000 " )
56
+ assert_equal (decode ["versionHex" ], "20200000 " )
57
57
assert_equal (rpc .getdeploymentinfo ()["deployments" ]["simplicity" ]["bip9" ]["status" ], "started" )
58
58
59
59
# Fail to signal on the 128th block. Since the threshold for Simplicity is
60
60
# 100% this will prevent activation. Note that our period is 128, not
61
61
# 144 (the default), as we have overridden the period for Simplicity. On
62
62
# the main Liquid chain it is overridden to be one week of signalling.
63
63
block = rpc .getnewblockhex ()
64
- block = block [:7 ] + "0" + block [8 :] # turn off Simplicity signal
64
+ block = block [:4 ] + "0" + block [5 :] # turn off Simplicity signal
65
65
rpc .submitblock (block )
66
66
assert_equal (rpc .getdeploymentinfo ()["deployments" ]["simplicity" ]["bip9" ]["status" ], "started" )
67
67
68
68
# Run through another 128 blocks, without failing to signal
69
69
blocks = self .generatetoaddress (rpc , 127 , rpc .getnewaddress ())
70
70
for n , block in enumerate (blocks ):
71
71
decode = rpc .getblockheader (block )
72
- assert_equal (decode ["versionHex" ], "21000000 " )
72
+ assert_equal (decode ["versionHex" ], "20200000 " )
73
73
assert_equal (rpc .getdeploymentinfo ()["deployments" ]["simplicity" ]["bip9" ]["status" ], "started" )
74
74
# The 128th block then switches from "started" to "locked_in"
75
75
blocks = self .generatetoaddress (rpc , 1 , rpc .getnewaddress ())
76
76
assert_equal (rpc .getdeploymentinfo ()["deployments" ]["simplicity" ]["bip9" ]["status" ], "started" )
77
77
assert_equal (rpc .getdeploymentinfo ()["deployments" ]["simplicity" ]["bip9" ]["status_next" ], "locked_in" )
78
- assert_equal (rpc .getblockheader (blocks [0 ])["versionHex" ], "21000000 " )
78
+ assert_equal (rpc .getblockheader (blocks [0 ])["versionHex" ], "20200000 " )
79
79
80
80
# Run through another 128 blocks, which will go from "locked in" to "active" regardless of signalling
81
81
blocks = self .generatetoaddress (rpc , 127 , rpc .getnewaddress ())
82
82
for n , block in enumerate (blocks ):
83
83
decode = rpc .getblockheader (block )
84
- assert_equal (decode ["versionHex" ], "21000000 " )
84
+ assert_equal (decode ["versionHex" ], "20200000 " )
85
85
assert_equal (rpc .getdeploymentinfo ()["deployments" ]["simplicity" ]["bip9" ]["status" ], "locked_in" )
86
86
block = rpc .getnewblockhex ()
87
- block = block [:7 ] + "0" + block [8 :] # turn off Simplicity signal
87
+ block = block [:4 ] + "0" + block [5 :] # turn off Simplicity signal
88
88
rpc .submitblock (block )
89
89
assert_equal (rpc .getdeploymentinfo ()["deployments" ]["simplicity" ]["bip9" ]["status" ], "locked_in" )
90
90
assert_equal (rpc .getdeploymentinfo ()["deployments" ]["simplicity" ]["bip9" ]["status_next" ], "active" )
0 commit comments