29
29
initial_extension = [initial_online + initial_online ]
30
30
new_extension = [initial_offline + initial_online ]
31
31
32
+ initial_cpe_root = "3700bdb2975ff8e0dadaaba2b33857b0ca2610c950a92b1db725025e3647a8e1"
33
+
32
34
ERR_MP_INVALID_PEGOUT = "invalid-pegout-proof"
33
35
ERR_MP_INVALID_PEGIN = "pegin-no-witness"
34
36
@@ -48,16 +50,19 @@ def validate_no_vote_op_true(node, block, first_dynafed_active_block):
48
50
assert_equal (dynamic_parameters ["current" ]["signblockscript" ], WSH_OP_TRUE )
49
51
if block_height % 10 == 0 or first_dynafed_active_block :
50
52
assert_equal (dynamic_parameters ["current" ]["type" ], "full" )
53
+ assert_equal (dynamic_parameters ["current" ]["root" ], initial_cpe_root )
51
54
assert_equal (dynamic_parameters ["current" ]["fedpegscript" ], "51" )
52
55
assert_equal (dynamic_parameters ["current" ]["extension_space" ], initial_extension )
53
56
else :
54
57
assert_equal (dynamic_parameters ["current" ]["type" ], "compact" )
58
+ assert_equal (dynamic_parameters ["current" ]["root" ], initial_cpe_root )
55
59
assert not "fedpegscript" in dynamic_parameters ["proposed" ]
56
60
assert not "extension_space" in dynamic_parameters ["proposed" ]
57
61
assert_equal (dynamic_parameters ["current" ]["max_block_witness" ], 74 )
58
62
# nothing was proposed, null fields make impossible to be valid blockheader
59
63
# due to script rules requiring bool true on stack
60
64
assert_equal (dynamic_parameters ["proposed" ]["type" ], "null" )
65
+ assert not "root" in dynamic_parameters ["proposed" ]
61
66
assert not "signblockscript" in dynamic_parameters ["proposed" ]
62
67
assert not "max_block_witness" in dynamic_parameters ["proposed" ]
63
68
assert not "fedpegscript" in dynamic_parameters ["proposed" ]
@@ -134,6 +139,9 @@ def test_dynafed_activation(self):
134
139
self .sync_blocks (timeout = 240 )
135
140
assert_equal (self .nodes [0 ].getblockchaininfo ()["softforks" ]["dynafed" ]["bip9" ]["status" ], "active" )
136
141
142
+ # Check the root hash
143
+ assert_equal (self .nodes [0 ].getblockchaininfo ()["current_params_root" ], initial_cpe_root )
144
+
137
145
# Existing blocks should have null dynafed fields
138
146
for block in blocks :
139
147
assert "dynamic_parameters" not in self .nodes [0 ].getblock (block )
0 commit comments