@@ -147,7 +147,37 @@ def _test_getblockchaininfo(self):
147
147
# should have exact keys
148
148
assert_equal (sorted (res .keys ()), keys )
149
149
150
- self .restart_node (0 , ['-stopatheight=207' , '-prune=550' , '-txindex=0' ])
150
+ self .stop_node (0 )
151
+ self .nodes [0 ].assert_start_raises_init_error (
152
+ extra_args = ['-testactivationheight=name@2' ],
153
+ expected_msg = 'Error: Invalid name (name@2) for -testactivationheight=name@height.' ,
154
+ )
155
+ self .nodes [0 ].assert_start_raises_init_error (
156
+ extra_args = ['-testactivationheight=bip34@-2' ],
157
+ expected_msg = 'Error: Invalid height value (bip34@-2) for -testactivationheight=name@height.' ,
158
+ )
159
+ self .nodes [0 ].assert_start_raises_init_error (
160
+ extra_args = ['-testactivationheight=' ],
161
+ expected_msg = 'Error: Invalid format () for -testactivationheight=name@height.' ,
162
+ )
163
+ self .start_node (0 , extra_args = [
164
+ '-stopatheight=207' ,
165
+ '-prune=550' ,
166
+ '-txindex=0' ,
167
+ '-testactivationheight=bip34@2' ,
168
+ '-testactivationheight=dersig@3' ,
169
+ '-testactivationheight=cltv@4' ,
170
+ '-testactivationheight=csv@5' ,
171
+ '-testactivationheight=bip147@6' ,
172
+ '-testactivationheight=dip0001@10' ,
173
+ '-dip3params=411:511' ,
174
+ '-testactivationheight=dip0008@12' ,
175
+ '-testactivationheight=dip0024@13' ,
176
+ '-testactivationheight=brr@14' ,
177
+ '-testactivationheight=v20@901' ,
178
+ '-testactivationheight=mn_rr@902' ,
179
+ ])
180
+
151
181
res = self .nodes [0 ].getblockchaininfo ()
152
182
# result should have these additional pruning keys if prune=550
153
183
assert_equal (sorted (res .keys ()), sorted (['pruneheight' , 'automatic_pruning' , 'prune_target_size' ] + keys ))
@@ -159,20 +189,20 @@ def _test_getblockchaininfo(self):
159
189
assert_equal (res ['prune_target_size' ], 576716800 )
160
190
assert_greater_than (res ['size_on_disk' ], 0 )
161
191
assert_equal (res ['softforks' ], {
162
- 'bip34' : {'type' : 'buried' , 'active' : True , 'height' : 1 },
163
- 'bip66' : {'type' : 'buried' , 'active' : True , 'height' : 1 },
164
- 'bip65' : {'type' : 'buried' , 'active' : True , 'height' : 1 },
165
- 'bip147 ' : { 'type' : 'buried' , 'active' : True , 'height' : 1 },
166
- 'csv ' : {'type' : 'buried' , 'active' : True , 'height' : 1 },
167
- 'dip0001' : { 'type' : 'buried' , 'active' : True , 'height' : 1 },
168
- 'dip0003' : { 'type' : 'buried' , 'active' : False , 'height' : 432 },
169
- 'dip0008' : { 'type' : 'buried' , 'active' : True , 'height' : 1 },
192
+ 'bip34' : {'type' : 'buried' , 'active' : True , 'height' : 2 },
193
+ 'bip66' : {'type' : 'buried' , 'active' : True , 'height' : 3 },
194
+ 'bip65' : {'type' : 'buried' , 'active' : True , 'height' : 4 },
195
+ 'csv ' : {'type' : 'buried' , 'active' : True , 'height' : 5 },
196
+ 'bip147 ' : {'type' : 'buried' , 'active' : True , 'height' : 6 },
197
+ 'dip0001' : { 'type' : 'buried' , 'active' : True , 'height' : 10 },
198
+ 'dip0003' : { 'type' : 'buried' , 'active' : False , 'height' : 411 },
199
+ 'dip0008' : { 'type' : 'buried' , 'active' : True , 'height' : 12 },
170
200
'dip0020' : { 'type' : 'buried' , 'active' : True , 'height' : 1 },
171
- 'dip0024' : { 'type' : 'buried' , 'active' : True , 'height' : 1 },
172
- 'realloc' : { 'type' : 'buried' , 'active' : True , 'height' : 1 },
201
+ 'dip0024' : { 'type' : 'buried' , 'active' : True , 'height' : 13 },
202
+ 'realloc' : { 'type' : 'buried' , 'active' : True , 'height' : 14 },
173
203
'v19' : { 'type' : 'buried' , 'active' : False , 'height' : 900 },
174
- 'v20' : { 'type' : 'buried' , 'active' : False , 'height' : 900 },
175
- 'mn_rr' : { 'type' : 'buried' , 'active' : False , 'height' : 900 },
204
+ 'v20' : { 'type' : 'buried' , 'active' : False , 'height' : 901 },
205
+ 'mn_rr' : { 'type' : 'buried' , 'active' : False , 'height' : 902 },
176
206
'withdrawals' : {
177
207
'type' : 'bip9' ,
178
208
'bip9' : {
0 commit comments