Changeset View
Changeset View
Standalone View
Standalone View
test/functional/feature_pruning.py
Show First 20 Lines • Show All 220 Lines • ▼ Show 20 Lines | def reorg_test(self): | ||||
self.nodes[2].getblockcount())) | self.nodes[2].getblockcount())) | ||||
self.log.info("Usage possibly still high because of stale blocks in block files: {}".format( | self.log.info("Usage possibly still high because of stale blocks in block files: {}".format( | ||||
calc_usage(self.prunedir))) | calc_usage(self.prunedir))) | ||||
self.log.info( | self.log.info( | ||||
"Mine 220 more large blocks so we have requisite history") | "Mine 220 more large blocks so we have requisite history") | ||||
mine_large_blocks(self.nodes[0], 220) | mine_large_blocks(self.nodes[0], 220) | ||||
sync_blocks(self.nodes[0:3], timeout=120) | |||||
usage = calc_usage(self.prunedir) | usage = calc_usage(self.prunedir) | ||||
self.log.info("Usage should be below target: {}".format(usage)) | self.log.info("Usage should be below target: {}".format(usage)) | ||||
assert_greater_than(550, usage) | assert_greater_than(550, usage) | ||||
def reorg_back(self): | def reorg_back(self): | ||||
# Verify that a block on the old main chain fork has been pruned away | # Verify that a block on the old main chain fork has been pruned away | ||||
assert_raises_rpc_error( | assert_raises_rpc_error( | ||||
▲ Show 20 Lines • Show All 286 Lines • Show Last 20 Lines |