diff --git a/test/functional/rpc_blockchain.py b/test/functional/rpc_blockchain.py index 287641142d6848..14e481f4328ba9 100755 --- a/test/functional/rpc_blockchain.py +++ b/test/functional/rpc_blockchain.py @@ -147,7 +147,37 @@ def _test_getblockchaininfo(self): # should have exact keys assert_equal(sorted(res.keys()), keys) - self.restart_node(0, ['-stopatheight=207', '-prune=550', '-txindex=0']) + self.stop_node(0) + self.nodes[0].assert_start_raises_init_error( + extra_args=['-testactivationheight=name@2'], + expected_msg='Error: Invalid name (name@2) for -testactivationheight=name@height.', + ) + self.nodes[0].assert_start_raises_init_error( + extra_args=['-testactivationheight=bip34@-2'], + expected_msg='Error: Invalid height value (bip34@-2) for -testactivationheight=name@height.', + ) + self.nodes[0].assert_start_raises_init_error( + extra_args=['-testactivationheight='], + expected_msg='Error: Invalid format () for -testactivationheight=name@height.', + ) + self.start_node(0, extra_args=[ + '-stopatheight=207', + '-prune=550', + '-txindex=0', + '-testactivationheight=bip34@2', + '-testactivationheight=dersig@3', + '-testactivationheight=cltv@4', + '-testactivationheight=csv@5', + '-testactivationheight=bip147@6', + '-testactivationheight=dip0001@10', + '-dip3params=411:511', + '-testactivationheight=dip0008@12', + '-testactivationheight=dip0024@13', + '-testactivationheight=brr@14', + '-testactivationheight=v20@901', + '-testactivationheight=mn_rr@902', + ]) + res = self.nodes[0].getblockchaininfo() # result should have these additional pruning keys if prune=550 assert_equal(sorted(res.keys()), sorted(['pruneheight', 'automatic_pruning', 'prune_target_size'] + keys)) @@ -159,20 +189,20 @@ def _test_getblockchaininfo(self): assert_equal(res['prune_target_size'], 576716800) assert_greater_than(res['size_on_disk'], 0) assert_equal(res['softforks'], { - 'bip34': {'type': 'buried', 'active': True, 'height': 1}, - 'bip66': {'type': 'buried', 'active': True, 'height': 1}, - 'bip65': {'type': 'buried', 'active': True, 'height': 1}, - 'bip147': { 'type': 'buried', 'active': True, 'height': 1}, - 'csv': {'type': 'buried', 'active': True, 'height': 1}, - 'dip0001': { 'type': 'buried', 'active': True, 'height': 1}, - 'dip0003': { 'type': 'buried', 'active': False, 'height': 432}, - 'dip0008': { 'type': 'buried', 'active': True, 'height': 1}, + 'bip34': {'type': 'buried', 'active': True, 'height': 2}, + 'bip66': {'type': 'buried', 'active': True, 'height': 3}, + 'bip65': {'type': 'buried', 'active': True, 'height': 4}, + 'csv': {'type': 'buried', 'active': True, 'height': 5}, + 'bip147': {'type': 'buried', 'active': True, 'height': 6}, + 'dip0001': { 'type': 'buried', 'active': True, 'height': 10}, + 'dip0003': { 'type': 'buried', 'active': False, 'height': 411}, + 'dip0008': { 'type': 'buried', 'active': True, 'height': 12}, 'dip0020': { 'type': 'buried', 'active': True, 'height': 1}, - 'dip0024': { 'type': 'buried', 'active': True, 'height': 1}, - 'realloc': { 'type': 'buried', 'active': True, 'height': 1}, + 'dip0024': { 'type': 'buried', 'active': True, 'height': 13}, + 'realloc': { 'type': 'buried', 'active': True, 'height': 14}, 'v19': { 'type': 'buried', 'active': False, 'height': 900}, - 'v20': { 'type': 'buried', 'active': False, 'height': 900}, - 'mn_rr': { 'type': 'buried', 'active': False, 'height': 900}, + 'v20': { 'type': 'buried', 'active': False, 'height': 901}, + 'mn_rr': { 'type': 'buried', 'active': False, 'height': 902}, 'withdrawals': { 'type': 'bip9', 'bip9': {