2929initial_extension = [initial_online + initial_online ]
3030new_extension = [initial_offline + initial_online ]
3131
32+ initial_cpe_root = "3700bdb2975ff8e0dadaaba2b33857b0ca2610c950a92b1db725025e3647a8e1"
33+
3234ERR_MP_INVALID_PEGOUT = "invalid-pegout-proof"
3335ERR_MP_INVALID_PEGIN = "pegin-no-witness"
3436
@@ -48,16 +50,19 @@ def validate_no_vote_op_true(node, block, first_dynafed_active_block):
4850 assert_equal (dynamic_parameters ["current" ]["signblockscript" ], WSH_OP_TRUE )
4951 if block_height % 10 == 0 or first_dynafed_active_block :
5052 assert_equal (dynamic_parameters ["current" ]["type" ], "full" )
53+ assert_equal (dynamic_parameters ["current" ]["root" ], initial_cpe_root )
5154 assert_equal (dynamic_parameters ["current" ]["fedpegscript" ], "51" )
5255 assert_equal (dynamic_parameters ["current" ]["extension_space" ], initial_extension )
5356 else :
5457 assert_equal (dynamic_parameters ["current" ]["type" ], "compact" )
58+ assert_equal (dynamic_parameters ["current" ]["root" ], initial_cpe_root )
5559 assert not "fedpegscript" in dynamic_parameters ["proposed" ]
5660 assert not "extension_space" in dynamic_parameters ["proposed" ]
5761 assert_equal (dynamic_parameters ["current" ]["max_block_witness" ], 74 )
5862 # nothing was proposed, null fields make impossible to be valid blockheader
5963 # due to script rules requiring bool true on stack
6064 assert_equal (dynamic_parameters ["proposed" ]["type" ], "null" )
65+ assert not "root" in dynamic_parameters ["proposed" ]
6166 assert not "signblockscript" in dynamic_parameters ["proposed" ]
6267 assert not "max_block_witness" in dynamic_parameters ["proposed" ]
6368 assert not "fedpegscript" in dynamic_parameters ["proposed" ]
@@ -134,6 +139,9 @@ def test_dynafed_activation(self):
134139 self .sync_blocks (timeout = 240 )
135140 assert_equal (self .nodes [0 ].getblockchaininfo ()["softforks" ]["dynafed" ]["bip9" ]["status" ], "active" )
136141
142+ # Check the root hash
143+ assert_equal (self .nodes [0 ].getblockchaininfo ()["current_params_root" ], initial_cpe_root )
144+
137145 # Existing blocks should have null dynafed fields
138146 for block in blocks :
139147 assert "dynamic_parameters" not in self .nodes [0 ].getblock (block )
0 commit comments