From c7980fb5530f3d7f92b9aace4dbc387d2cf6215f Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Thu, 15 Oct 2026 09:35:52 +0000 Subject: [PATCH] minor changes, fixes and cleanups --- mmgen/proto/btc/tx/info.py | 4 ++-- test/cmdtest_d/remote.py | 12 ++++++++++++ test/cmdtest_d/rune.py | 7 ++++++- test/cmdtest_d/xmrwallet.py | 2 +- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/mmgen/proto/btc/tx/info.py b/mmgen/proto/btc/tx/info.py index f0866910..4896ccc9 100644 --- a/mmgen/proto/btc/tx/info.py +++ b/mmgen/proto/btc/tx/info.py @@ -53,7 +53,7 @@ class TxInfo(TxInfo): sort, ','.join(self.sort_orders))) - def get_mmid_fmt(e, is_output, *, terse=False): + def get_mmid_fmt(e, is_output): if e.mmid: return e.mmid.fmt2( max_mmwid, @@ -98,7 +98,7 @@ class TxInfo(TxInfo): for n, e in enumerate(io_sorted()): yield '{:3} {} {} {}\n'.format( n + 1, - e.addr.fmt(vp1, addr_w, color=True) + ' ' + get_mmid_fmt(e, is_output, terse=True) + e.addr.fmt(vp1, addr_w, color=True) + ' ' + get_mmid_fmt(e, is_output) if e.addr else data_disp(e.data), e.amt.fmt(iwidth, color=True), tx.dcoin) diff --git a/test/cmdtest_d/remote.py b/test/cmdtest_d/remote.py index c9760d17..e41cc349 100644 --- a/test/cmdtest_d/remote.py +++ b/test/cmdtest_d/remote.py @@ -22,6 +22,9 @@ class CmdTestRemote(CmdTestBase, CmdTestSwapMethods, CmdTestRuneMethods): thornode_servers = ('rpc', 'midgard', 'swap') cmd_group = ( + ('full_help', 'printing help info (--help)'), + ('help', 'printing help info (help)'), + ('cmd_help', 'printing help info for command (balance)'), ('ping', 'pinging remote REST server'), ('health', 'checking health of THORChain network'), ('mimir', 'getting Mimir variables'), @@ -43,6 +46,15 @@ class CmdTestRemote(CmdTestBase, CmdTestSwapMethods, CmdTestRuneMethods): return self.start_thornode_servers() + def full_help(self): + return self._rune_remote('--help') + + def help(self): + return self._rune_remote('help') + + def cmd_help(self): + return self._rune_remote('help', ['balance']) + def ping(self): return self._rune_remote('ping') diff --git a/test/cmdtest_d/rune.py b/test/cmdtest_d/rune.py index 353a7c69..c5373c15 100644 --- a/test/cmdtest_d/rune.py +++ b/test/cmdtest_d/rune.py @@ -35,7 +35,12 @@ class CmdTestRuneMethods: t.expect(prompt, 'q') return t - def _rune_txcreate(self, args=['98831F3A:X:2,54.321'], add_opts=[], append_args=[], menu_prompt=None): + def _rune_txcreate( + self, + args = ['98831F3A:X:2,54.321'], + add_opts = [], + append_args = [], + menu_prompt = None): t = self.spawn('mmgen-txcreate', self.rune_opts + add_opts + args + append_args) t.expect(menu_prompt or self.menu_prompt, 'q') t.expect('spend from: ', '3\n') diff --git a/test/cmdtest_d/xmrwallet.py b/test/cmdtest_d/xmrwallet.py index 4f6fb81c..eda4a44f 100644 --- a/test/cmdtest_d/xmrwallet.py +++ b/test/cmdtest_d/xmrwallet.py @@ -242,7 +242,7 @@ class CmdTestXMRWallet(CmdTestBase): common_args = ['--p2p-bind-ip=127.0.0.1', '--fixed-difficulty=1', '--regtest'] # --rpc-ssl-allow-any-cert for u in self.users: other_ports = [self.users[u2].md.p2p_port for u2 in self.users if u2 != u] - node_args = [f'--add-exclusive-node=127.0.0.1:{p}' for p in other_ports] + node_args = [f'--add-exclusive-node=127.0.0.1:{p}' for p in other_ports if p] self.users[u].md.usr_coind_args = ( common_args + node_args