Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_framework/test_framework.py
Show First 20 Lines • Show All 455 Lines • ▼ Show 20 Lines | def _initialize_chain(self): | ||||
self.stop_nodes() | self.stop_nodes() | ||||
self.nodes = [] | self.nodes = [] | ||||
self.disable_mocktime() | self.disable_mocktime() | ||||
for i in range(MAX_NODES): | for i in range(MAX_NODES): | ||||
os.remove(log_filename(self.options.cachedir, i, "debug.log")) | os.remove(log_filename(self.options.cachedir, i, "debug.log")) | ||||
os.remove(log_filename( | os.remove(log_filename( | ||||
self.options.cachedir, i, "wallets/db.log")) | self.options.cachedir, i, "wallets/db.log")) | ||||
os.remove(log_filename(self.options.cachedir, i, "peers.dat")) | os.remove(log_filename(self.options.cachedir, i, "peers.dat")) | ||||
os.remove(log_filename( | |||||
self.options.cachedir, i, "fee_estimates.dat")) | |||||
for i in range(self.num_nodes): | for i in range(self.num_nodes): | ||||
from_dir = os.path.join(self.options.cachedir, "node" + str(i)) | from_dir = os.path.join(self.options.cachedir, "node" + str(i)) | ||||
to_dir = os.path.join(self.options.tmpdir, "node" + str(i)) | to_dir = os.path.join(self.options.tmpdir, "node" + str(i)) | ||||
shutil.copytree(from_dir, to_dir) | shutil.copytree(from_dir, to_dir) | ||||
# Overwrite port/rpcport in bitcoin.conf | # Overwrite port/rpcport in bitcoin.conf | ||||
initialize_datadir(self.options.tmpdir, i) | initialize_datadir(self.options.tmpdir, i) | ||||
▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines |