Changeset View
Changeset View
Standalone View
Standalone View
test/functional/pruning.py
Show First 20 Lines • Show All 356 Lines • ▼ Show 20 Lines | def manual_test(self, node_number, use_timestamp): | ||||
node_number, self.options.tmpdir, ["-prune=550"], timewait=900) | node_number, self.options.tmpdir, ["-prune=550"], timewait=900) | ||||
self.log.info("Success") | self.log.info("Success") | ||||
def wallet_test(self): | def wallet_test(self): | ||||
# check that the pruning node's wallet is still in good shape | # check that the pruning node's wallet is still in good shape | ||||
self.log.info("Stop and start pruning node to trigger wallet rescan") | self.log.info("Stop and start pruning node to trigger wallet rescan") | ||||
self.stop_node(2) | self.stop_node(2) | ||||
self.start_node(2, self.options.tmpdir, ["-prune=550"]) | self.nodes[2] = self.start_node(2, self.options.tmpdir, ["-prune=550"]) | ||||
self.log.info("Success") | self.log.info("Success") | ||||
# check that wallet loads loads successfully when restarting a pruned node after IBD. | # check that wallet loads loads successfully when restarting a pruned node after IBD. | ||||
# this was reported to fail in #7494. | # this was reported to fail in #7494. | ||||
self.log.info("Syncing node 5 to test wallet") | self.log.info("Syncing node 5 to test wallet") | ||||
connect_nodes(self.nodes[0], 5) | connect_nodes(self.nodes[0], 5) | ||||
nds = [self.nodes[0], self.nodes[5]] | nds = [self.nodes[0], self.nodes[5]] | ||||
sync_blocks(nds, wait=5, timeout=300) | sync_blocks(nds, wait=5, timeout=300) | ||||
self.stop_node(5) # stop and start to trigger rescan | self.stop_node(5) # stop and start to trigger rescan | ||||
self.start_node(5, self.options.tmpdir, ["-prune=550"]) | self.nodes[5] = self.start_node(5, self.options.tmpdir, ["-prune=550"]) | ||||
self.log.info("Success") | self.log.info("Success") | ||||
def run_test(self): | def run_test(self): | ||||
self.log.info( | self.log.info( | ||||
"Warning! This test requires 4GB of disk space and takes over 30 mins (up to 2 hours)") | "Warning! This test requires 4GB of disk space and takes over 30 mins (up to 2 hours)") | ||||
self.log.info("Mining a big blockchain of 995 blocks") | self.log.info("Mining a big blockchain of 995 blocks") | ||||
# Determine default relay fee | # Determine default relay fee | ||||
▲ Show 20 Lines • Show All 120 Lines • Show Last 20 Lines |