From 2af674a4ce458022f9b5bb033ac2de1060bc14ae Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Tue, 5 Oct 2021 11:57:33 +0000 Subject: [PATCH] CoinDaemon: include non-standard --datadir for BCH --- mmgen/daemon.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mmgen/daemon.py b/mmgen/daemon.py index e7953805..afef3898 100755 --- a/mmgen/daemon.py +++ b/mmgen/daemon.py @@ -484,6 +484,7 @@ class bitcoin_core_daemon(CoinDaemon): 'linux': [g.home_dir,'.bitcoin'], 'win': [os.getenv('APPDATA'),'Bitcoin'] } + nonstd_datadir = False def init_datadir(self): if self.network == 'regtest' and not self.test_suite: @@ -505,7 +506,7 @@ class bitcoin_core_daemon(CoinDaemon): from .regtest import MMGenRegtest self.shared_args = list_gen( - [f'--datadir={self.datadir}', self.non_dfl_datadir], + [f'--datadir={self.datadir}', self.nonstd_datadir or self.non_dfl_datadir], [f'--rpcport={self.rpc_port}'], [f'--rpcuser={MMGenRegtest.rpc_user}', self.network == 'regtest'], [f'--rpcpassword={MMGenRegtest.rpc_password}', self.network == 'regtest'], @@ -523,7 +524,7 @@ class bitcoin_core_daemon(CoinDaemon): ['--fallbackfee=0.0002', self.coin == 'BTC' and self.network == 'regtest'], ['--usecashaddr=0', self.coin == 'BCH'], ['--mempoolreplacement=1', self.coin == 'LTC'], - ['--txindex=1', self.coin == 'LTC'], + ['--txindex=1', self.coin == 'LTC' or self.network == 'regtest'], ) self.lockfile = os.path.join(self.network_datadir,'.cookie') @@ -559,6 +560,7 @@ class bitcoin_cash_node_daemon(bitcoin_core_daemon): 'win': [os.getenv('APPDATA'),'Bitcoin_ABC'] } cfg_file_hdr = '# Bitcoin Cash Node config file\n' + nonstd_datadir = True class litecoin_core_daemon(bitcoin_core_daemon): daemon_data = _dd('Litecoin Core', 180100, '0.18.1')