From 75051cd8312a1ebd7e30b7c84b386da053e4786c Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Tue, 8 Oct 2024 12:55:57 +0000 Subject: [PATCH] regtest: remove coin component from data_dir path --- mmgen/cfg.py | 2 +- test/cmdtest_py_d/ct_automount.py | 14 -------------- test/cmdtest_py_d/ct_regtest.py | 2 +- 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/mmgen/cfg.py b/mmgen/cfg.py index 84ab06f1..8a42a4d0 100755 --- a/mmgen/cfg.py +++ b/mmgen/cfg.py @@ -399,7 +399,7 @@ class Config(Lockable): """ if not hasattr(self,'_data_dir'): self._data_dir = os.path.normpath(os.path.join(*{ - 'regtest': (self.data_dir_root, 'regtest', self.coin.lower(), (self.regtest_user or 'none') ), + 'regtest': (self.data_dir_root, 'regtest', (self.regtest_user or 'none')), 'testnet': (self.data_dir_root, 'testnet'), 'mainnet': (self.data_dir_root,), }[self.network] )) diff --git a/test/cmdtest_py_d/ct_automount.py b/test/cmdtest_py_d/ct_automount.py index e21c8e18..3db6d6b3 100755 --- a/test/cmdtest_py_d/ct_automount.py +++ b/test/cmdtest_py_d/ct_automount.py @@ -41,7 +41,6 @@ class CmdTestAutosignAutomount(CmdTestAutosignThreaded, CmdTestRegtestBDBWallet) ('alice_bal1', 'checking Alice’s balance'), ('alice_txcreate1', 'creating a transaction'), ('alice_txcreate_bad_have_unsigned', 'creating the transaction again (error)'), - ('copy_wallet', 'copying Alice’s wallet'), ('alice_run_autosign_setup', 'running ‘autosign setup’ (with default wallet)'), ('wait_loop_start', 'starting autosign wait loop'), ('alice_txstatus1', 'getting transaction status (unsigned)'), @@ -165,19 +164,6 @@ class CmdTestAutosignAutomount(CmdTestAutosignThreaded, CmdTestRegtestBDBWallet) def alice_txcreate_bad_have_unsent(self): return self._alice_txcreate(chg_addr='C:5', exit_val=2, expect_str='unsent transaction') - def copy_wallet(self): - self.spawn('', msg_only=True) - if cfg.coin == 'BTC': - return 'skip_msg' - src = Path(self.tr.data_dir, 'regtest', cfg.coin.lower(), 'alice') - dest = Path(self.tr.data_dir, 'regtest', 'btc', 'alice') - dest.mkdir(parents=True, exist_ok=True) - wf = Path(get_file_with_ext(src, 'mmdat')).absolute() - link_path = dest / wf.name - if not link_path.exists(): - link_path.symlink_to(wf) - return 'ok' - def alice_run_autosign_setup(self): return self.run_setup(mn_type='default', use_dfl_wallet=True, passwd=rt_pw) diff --git a/test/cmdtest_py_d/ct_regtest.py b/test/cmdtest_py_d/ct_regtest.py index 03b8451b..9cd58f9a 100755 --- a/test/cmdtest_py_d/ct_regtest.py +++ b/test/cmdtest_py_d/ct_regtest.py @@ -559,7 +559,7 @@ class CmdTestRegtest(CmdTestBase,CmdTestShared): return self.walletgen('alice') def _user_dir(self, user, coin=None): - return joinpath(self.tr.data_dir, 'regtest', coin or self.coin, user) + return joinpath(self.tr.data_dir, 'regtest', user) def _user_sid(self,user): if user in self.user_sids: