Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_framework/util.py
Show First 20 Lines • Show All 324 Lines • ▼ Show 20 Lines | def initialize_datadir(dirname, n): | ||||
if not os.path.isdir(datadir): | if not os.path.isdir(datadir): | ||||
os.makedirs(datadir) | os.makedirs(datadir) | ||||
with open(os.path.join(datadir, "bitcoin.conf"), 'w', encoding='utf8') as f: | with open(os.path.join(datadir, "bitcoin.conf"), 'w', encoding='utf8') as f: | ||||
f.write("regtest=1\n") | f.write("regtest=1\n") | ||||
f.write("port=" + str(p2p_port(n)) + "\n") | f.write("port=" + str(p2p_port(n)) + "\n") | ||||
f.write("rpcport=" + str(rpc_port(n)) + "\n") | f.write("rpcport=" + str(rpc_port(n)) + "\n") | ||||
f.write("listenonion=0\n") | f.write("listenonion=0\n") | ||||
f.write("usecashaddr=1\n") | f.write("usecashaddr=1\n") | ||||
# Activate 'great wall' protocol upgrade in the past by default. This | |||||
# lets us discover incompatiblities before activation. Tests can | |||||
# explicitly override this using extra_args. Timestamp is 01.01.2019. | |||||
f.write("greatwallactivationtime=1546300800\n") | |||||
return datadir | return datadir | ||||
def get_datadir_path(dirname, n): | def get_datadir_path(dirname, n): | ||||
return os.path.join(dirname, "node" + str(n)) | return os.path.join(dirname, "node" + str(n)) | ||||
def get_auth_cookie(datadir): | def get_auth_cookie(datadir): | ||||
▲ Show 20 Lines • Show All 293 Lines • Show Last 20 Lines |