Browse Source

Separate commitment files for signet and testnet

master
Kristaps Kaupe 5 years ago
parent
commit
b914e7512e
No known key found for this signature in database
GPG Key ID: 33E472FE870C7E5D
  1. 8
      jmclient/jmclient/configure.py

8
jmclient/jmclient/configure.py

@ -597,12 +597,14 @@ def load_program_config(config_path="", bs=None):
global_singleton.commit_file_location = global_singleton.config.get( global_singleton.commit_file_location = global_singleton.config.get(
"POLICY", "commit_file_location") "POLICY", "commit_file_location")
except NoOptionError: #pragma: no cover except NoOptionError: #pragma: no cover
log.debug("No commitment file location in config, using default " if get_network() == "mainnet":
log.debug("No commitment file location in config, using default "
"location cmtdata/commitments.json") "location cmtdata/commitments.json")
if get_network() != "mainnet": if get_network() != "mainnet":
# no need to be flexible for tests; note this is used # no need to be flexible for tests; note this is used
# for regtest as well as testnet(3) # for regtest, signet and testnet3
global_singleton.commit_file_location = "cmtdata/testnet_commitments.json" global_singleton.commit_file_location = "cmtdata/" + get_network() + \
"_commitments.json"
set_commitment_file(os.path.join(config_path, set_commitment_file(os.path.join(config_path,
global_singleton.commit_file_location)) global_singleton.commit_file_location))

Loading…
Cancel
Save