Set Bitcoincash .conf file and port from basicswap.json.

This commit is contained in:
tecnovert
2024-11-02 11:17:00 +02:00
parent 5df9b044ab
commit 5ee28d0aa3
6 changed files with 82 additions and 43 deletions

View File

@@ -105,6 +105,7 @@ def run_prepare(node_id, datadir_path, bins_path, with_coins, mnemonic_in=None,
os.environ['BTC_RPC_PORT'] = str(BITCOIN_RPC_PORT_BASE)
os.environ['LTC_RPC_PORT'] = str(LITECOIN_RPC_PORT_BASE)
os.environ['DCR_RPC_PORT'] = str(DECRED_RPC_PORT_BASE)
os.environ['BCH_PORT'] = str(BCH_BASE_PORT)
os.environ['BCH_RPC_PORT'] = str(BITCOINCASH_RPC_PORT_BASE)
os.environ['FIRO_RPC_PORT'] = str(FIRO_RPC_PORT_BASE)
@@ -329,7 +330,7 @@ def run_prepare(node_id, datadir_path, bins_path, with_coins, mnemonic_in=None,
for line in lines:
if not line.startswith('prune'):
fp.write(line)
fp.write('port={}\n'.format(BCH_BASE_PORT + node_id + port_ofs))
# NOTE: port is set (when starting daemon) from basicswap.json
fp.write('bind=127.0.0.1\n')
fp.write('dnsseed=0\n')
fp.write('discover=0\n')