Changeset View
Changeset View
Standalone View
Standalone View
test/functional/feature_dbcrash.py
Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | def set_test_params(self): | ||||
self.rpc_timeout = 480 | self.rpc_timeout = 480 | ||||
self.supports_cli = False | self.supports_cli = False | ||||
# Set -maxmempool=0 to turn off mempool memory sharing with dbcache | # Set -maxmempool=0 to turn off mempool memory sharing with dbcache | ||||
# Set -rpcservertimeout=900 to reduce socket disconnects in this | # Set -rpcservertimeout=900 to reduce socket disconnects in this | ||||
# long-running test | # long-running test | ||||
self.base_args = ["-limitdescendantsize=0", "-maxmempool=0", | self.base_args = ["-limitdescendantsize=0", "-maxmempool=0", | ||||
"-rpcservertimeout=900", "-dbbatchsize=200000", | "-rpcservertimeout=900", "-dbbatchsize=200000", | ||||
"-wallet=", "-noparkdeepreorg"] | "-noparkdeepreorg"] | ||||
# Set different crash ratios and cache sizes. Note that not all of | # Set different crash ratios and cache sizes. Note that not all of | ||||
# -dbcache goes to the in-memory coins cache. | # -dbcache goes to the in-memory coins cache. | ||||
self.node0_args = ["-dbcrashratio=8", "-dbcache=4"] + self.base_args | self.node0_args = ["-dbcrashratio=8", "-dbcache=4"] + self.base_args | ||||
self.node1_args = ["-dbcrashratio=16", "-dbcache=8"] + self.base_args | self.node1_args = ["-dbcrashratio=16", "-dbcache=8"] + self.base_args | ||||
self.node2_args = ["-dbcrashratio=24", "-dbcache=16"] + self.base_args | self.node2_args = ["-dbcrashratio=24", "-dbcache=16"] + self.base_args | ||||
# Node3 is a normal node with default args, except will mine full blocks | # Node3 is a normal node with default args, except will mine full blocks | ||||
# and non-standard txs (e.g. txs with "dust" outputs) | # and non-standard txs (e.g. txs with "dust" outputs) | ||||
self.node3_args = [ | self.node3_args = [ | ||||
"-blockmaxsize={}".format(DEFAULT_MAX_BLOCK_SIZE), | "-blockmaxsize={}".format(DEFAULT_MAX_BLOCK_SIZE), | ||||
"-acceptnonstdtxn", "-wallet="] | "-acceptnonstdtxn"] | ||||
self.extra_args = [self.node0_args, self.node1_args, | self.extra_args = [self.node0_args, self.node1_args, | ||||
self.node2_args, self.node3_args] | self.node2_args, self.node3_args] | ||||
def skip_test_if_missing_module(self): | def skip_test_if_missing_module(self): | ||||
self.skip_if_no_wallet() | self.skip_if_no_wallet() | ||||
def setup_network(self): | def setup_network(self): | ||||
self.add_nodes(self.num_nodes, extra_args=self.extra_args) | self.add_nodes(self.num_nodes, extra_args=self.extra_args) | ||||
▲ Show 20 Lines • Show All 250 Lines • Show Last 20 Lines |