Skip to content

Commit

Permalink
[test] Add manual prune startup test case
Browse files Browse the repository at this point in the history
  • Loading branch information
dergoegge committed Mar 13, 2023
1 parent 4517419 commit 05eeba2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/functional/rpc_blockchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def set_test_params(self):

def run_test(self):
self.wallet = MiniWallet(self.nodes[0])
self._test_prune_disk_space()
self.mine_chain()
self._test_max_future_block_time()
self.restart_node(
Expand Down Expand Up @@ -100,6 +101,13 @@ def mine_chain(self):
self.generate(self.wallet, 1)
assert_equal(self.nodes[0].getblockchaininfo()['blocks'], HEIGHT)

def _test_prune_disk_space(self):
self.log.info("Test that a manually pruned node does not run into "
"integer overflow on first start up")
self.restart_node(0, extra_args=["-prune=1"])
self.log.info("Avoid warning when assumed chain size is enough")
self.restart_node(0, extra_args=["-prune=123456789"])

def _test_max_future_block_time(self):
self.stop_node(0)
self.log.info("A block tip of more than MAX_FUTURE_BLOCK_TIME in the future raises an error")
Expand Down

0 comments on commit 05eeba2

Please sign in to comment.