Changeset View
Changeset View
Standalone View
Standalone View
test/functional/feature_pruning.py
Show First 20 Lines • Show All 78 Lines • ▼ Show 20 Lines | def calc_usage(blockdir): | ||||
return sum(os.path.getsize(blockdir + f) for f in os.listdir(blockdir) | return sum(os.path.getsize(blockdir + f) for f in os.listdir(blockdir) | ||||
if os.path.isfile(os.path.join(blockdir, f))) / (1024. * 1024.) | if os.path.isfile(os.path.join(blockdir, f))) / (1024. * 1024.) | ||||
class PruneTest(BitcoinTestFramework): | class PruneTest(BitcoinTestFramework): | ||||
def set_test_params(self): | def set_test_params(self): | ||||
self.setup_clean_chain = True | self.setup_clean_chain = True | ||||
self.num_nodes = 6 | self.num_nodes = 6 | ||||
self.supports_cli = False | |||||
# Create nodes 0 and 1 to mine. | # Create nodes 0 and 1 to mine. | ||||
# Create node 2 to test pruning. | # Create node 2 to test pruning. | ||||
self.full_node_default_args = ["-maxreceivebuffer=20000", "-blockmaxsize=999000", | self.full_node_default_args = ["-maxreceivebuffer=20000", "-blockmaxsize=999000", | ||||
"-checkblocks=5", "-noparkdeepreorg", "-maxreorgdepth=-1"] | "-checkblocks=5", "-noparkdeepreorg", "-maxreorgdepth=-1"] | ||||
# Create nodes 3 and 4 to test manual pruning (they will be re-started with manual pruning later) | # Create nodes 3 and 4 to test manual pruning (they will be re-started with manual pruning later) | ||||
# Create nodes 5 to test wallet in prune mode, but do not connect | # Create nodes 5 to test wallet in prune mode, but do not connect | ||||
self.extra_args = [self.full_node_default_args, | self.extra_args = [self.full_node_default_args, | ||||
▲ Show 20 Lines • Show All 429 Lines • Show Last 20 Lines |