diff options
author | dergoegge <n.goeggi@gmail.com> | 2023-03-13 12:55:03 +0100 |
---|---|---|
committer | dergoegge <n.goeggi@gmail.com> | 2023-03-13 13:10:11 +0100 |
commit | 05eeba2c5fb312e0e6a730b01eb7d1b422d75dbb (patch) | |
tree | ba5cab70c70c5054d31336808f129af4d3f7591d /test | |
parent | 451741962885eaa4b55033d53af731e0ba22650f (diff) | |
download | bitcoin-05eeba2c5fb312e0e6a730b01eb7d1b422d75dbb.tar.xz |
[test] Add manual prune startup test case
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/rpc_blockchain.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/functional/rpc_blockchain.py b/test/functional/rpc_blockchain.py index 7a0cedb1f5..6022042c11 100755 --- a/test/functional/rpc_blockchain.py +++ b/test/functional/rpc_blockchain.py @@ -69,6 +69,7 @@ class BlockchainTest(BitcoinTestFramework): 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( @@ -100,6 +101,13 @@ class BlockchainTest(BitcoinTestFramework): 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") |