mirror of
https://github.com/basicswap/basicswap.git
synced 2025-03-12 09:38:03 +00:00
Change BCH pidfile name and cli binary.
This commit is contained in:
parent
bff3c45976
commit
ccc90ccb67
4 changed files with 8 additions and 5 deletions
|
@ -126,7 +126,8 @@ class BaseApp:
|
|||
def callcoincli(self, coin_type, params, wallet=None, timeout=None):
|
||||
bindir = self.coin_clients[coin_type]['bindir']
|
||||
datadir = self.coin_clients[coin_type]['datadir']
|
||||
command_cli = os.path.join(bindir, chainparams[coin_type]['name'] + '-cli' + ('.exe' if os.name == 'nt' else ''))
|
||||
cli_bin: str = chainparams[coin_type].get('cli_binname', chainparams[coin_type]['name'] + '-cli')
|
||||
command_cli = os.path.join(bindir, cli_bin + ('.exe' if os.name == 'nt' else ''))
|
||||
args = [command_cli, ]
|
||||
if self.chain != 'mainnet':
|
||||
args.append('-' + self.chain)
|
||||
|
|
|
@ -756,7 +756,7 @@ class BasicSwap(BaseApp):
|
|||
authcookiepath = os.path.join(self.getChainDatadirPath(coin), '.cookie')
|
||||
|
||||
pidfilename = cc['name']
|
||||
if cc['name'] in ('bitcoin', 'litecoin', 'namecoin', 'dash', 'firo'):
|
||||
if cc['name'] in ('bitcoin', 'litecoin', 'namecoin', 'dash', 'firo', 'bitcoincash'):
|
||||
pidfilename += 'd'
|
||||
|
||||
pidfilepath = os.path.join(self.getChainDatadirPath(coin), pidfilename + '.pid')
|
||||
|
|
|
@ -930,7 +930,6 @@ def prepareDataDir(coin, settings, chain, particl_mnemonic, extra_opts={}):
|
|||
for opt_line in wownerod_proxy_config:
|
||||
fp.write(opt_line + '\n')
|
||||
|
||||
if coin in ('wownero', 'monero'):
|
||||
wallets_dir = core_settings.get('walletsdir', data_dir)
|
||||
if not os.path.exists(wallets_dir):
|
||||
os.makedirs(wallets_dir)
|
||||
|
@ -1002,7 +1001,8 @@ def prepareDataDir(coin, settings, chain, particl_mnemonic, extra_opts={}):
|
|||
|
||||
return
|
||||
|
||||
core_conf_path = os.path.join(data_dir, coin + '.conf')
|
||||
core_conf_name: str = 'bitcoin.conf' if coin == 'bitcoincash' else coin + '.conf'
|
||||
core_conf_path: str = os.path.join(data_dir, core_conf_name)
|
||||
if os.path.exists(core_conf_path):
|
||||
exitWithError('{} exists'.format(core_conf_path))
|
||||
with open(core_conf_path, 'w') as fp:
|
||||
|
@ -1056,7 +1056,8 @@ def prepareDataDir(coin, settings, chain, particl_mnemonic, extra_opts={}):
|
|||
if BTC_RPC_USER != '':
|
||||
fp.write('rpcauth={}:{}${}\n'.format(BTC_RPC_USER, salt, password_to_hmac(salt, BTC_RPC_PWD)))
|
||||
elif coin == 'bitcoincash':
|
||||
fp.write('prune=2000\n')
|
||||
fp.write('prune=4000\n')
|
||||
fp.write('pid=bitcoincashd.pid\n')
|
||||
if BCH_RPC_USER != '':
|
||||
fp.write('rpcauth={}:{}${}\n'.format(BCH_RPC_USER, salt, password_to_hmac(salt, BCH_RPC_PWD)))
|
||||
elif coin == 'namecoin':
|
||||
|
|
|
@ -443,6 +443,7 @@ chainparams = {
|
|||
'has_cltv': True,
|
||||
'has_csv': True,
|
||||
'has_segwit': False,
|
||||
'cli_binname' : 'bitcoin-cli',
|
||||
'mainnet': {
|
||||
'rpcport': 8332,
|
||||
'pubkey_address': 0,
|
||||
|
|
Loading…
Reference in a new issue