diff --git a/mmgen/cfg.py b/mmgen/cfg.py index ef4a5d60..a135eb85 100755 --- a/mmgen/cfg.py +++ b/mmgen/cfg.py @@ -78,7 +78,7 @@ class GlobalConstants(Lockable): 'txcreate': _cc(True, True, True, None, ['tw'], 'lmw'), 'txdo': _cc(True, True, True, None, ['tw'], 'lmw'), 'txsend': _cc(True, True, True, None, ['tw'], 'lmw'), - 'txsign': _cc(True, True, True, None, ['tw'], 'lmw'), + 'txsign': _cc(True, True, False, '-rRb', ['tw'], 'lmw'), 'walletchk': _cc(False, False, False, None, [], 'lmw'), 'walletconv': _cc(False, False, False, None, [], 'lmw'), 'walletgen': _cc(False, False, False, None, [], 'lmw'), diff --git a/test/cmdtest_d/ct_ethdev.py b/test/cmdtest_d/ct_ethdev.py index 0cfb8d0c..68962129 100755 --- a/test/cmdtest_d/ct_ethdev.py +++ b/test/cmdtest_d/ct_ethdev.py @@ -716,12 +716,12 @@ class CmdTestEthdev(CmdTestBase, CmdTestShared): t = self.spawn( 'mmgen-txsign', self.eth_args - + [f'--coin={self.proto.coin}'] + ['--rpc-host=bad_host'] # ETH signing must work without RPC + ([], ['--yes'])[ni] + ([f'--keys-from-file={keyfile}'] if dev_send else []) + add_args - + [txfile, dfl_words_file]) + + [txfile, dfl_words_file], + no_passthru_opts = ['coin']) return self.txsign_ui_common(t, ni=ni, has_label=True) def txsend(self, ext='{}.regtest.sigtx', add_args=[], test=False): @@ -1070,7 +1070,9 @@ class CmdTestEthdev(CmdTestBase, CmdTestShared): t.written_to_file('transaction') ext = '[0,8000]{}.regtest.rawtx'.format('-α' if cfg.debug_utf8 else '') txfile = self.get_file_with_ext(ext, no_dot=True) - t = self.spawn('mmgen-txsign', self.eth_args + ['--yes', '-k', keyfile, txfile], no_msg=True) + t = self.spawn( + 'mmgen-txsign', + self.eth_args + ['--yes', '-k', keyfile, txfile], no_msg=True, no_passthru_opts=['coin']) self.txsign_ui_common(t, ni=True) txfile = txfile.replace('.rawtx', '.sigtx') t = self.spawn('mmgen-txsend', self.eth_args + [txfile], no_msg=True) @@ -1237,7 +1239,7 @@ class CmdTestEthdev(CmdTestBase, CmdTestShared): add_comment = tx_comment_lat_cyr_gr, file_desc = file_desc) def token_txsign(self, ext='', token='', add_args=[], ni=True): - return self.txsign(ni=ni, ext=ext, add_args=[f'--token={token}'] + add_args) + return self.txsign(ni=ni, ext=ext, add_args=add_args) def token_txsend(self, ext='', token=''): return self.txsend(ext=ext, add_args=['--token='+token]) diff --git a/test/cmdtest_d/ct_main.py b/test/cmdtest_d/ct_main.py index 292a134b..b28584c5 100755 --- a/test/cmdtest_d/ct_main.py +++ b/test/cmdtest_d/ct_main.py @@ -931,7 +931,8 @@ class CmdTestMain(CmdTestBase, CmdTestShared): args=['-H', f'{rf},{hincog_offset}', '-l', str(hincog_seedlen)]) def txsign_keyaddr(self, keyaddr_file, txfile): - t = self.spawn('mmgen-txsign', ['-d', self.tmpdir, '-p1', '-M', keyaddr_file, txfile]) + t = self.spawn('mmgen-txsign', + ['-d', self.tmpdir, '-p1', '-M', keyaddr_file, txfile], no_passthru_opts=['coin']) t.license() t.view_tx('n') t.do_decrypt_ka_data(pw=self.kapasswd) @@ -951,7 +952,8 @@ class CmdTestMain(CmdTestBase, CmdTestShared): return self.txcreate_common(sources=['2']) def txsign2(self, wf1, txf1, wf2, txf2): - t = self.spawn('mmgen-txsign', ['-d', self.tmpdir, txf1, wf1, txf2, wf2]) + t = self.spawn('mmgen-txsign', + ['-d', self.tmpdir, txf1, wf1, txf2, wf2], no_passthru_opts=['coin']) t.license() for cnum, wf in (('1', wf1), ('2', wf2)): wcls = get_wallet_cls(ext=get_extension(wf)) @@ -973,7 +975,7 @@ class CmdTestMain(CmdTestBase, CmdTestShared): return self.txcreate_common(sources=['1', '3']) def txsign3(self, wf1, wf2, txf2): - t = self.spawn('mmgen-txsign', ['-d', self.tmpdir, wf1, wf2, txf2]) + t = self.spawn('mmgen-txsign', ['-d', self.tmpdir, wf1, wf2, txf2], no_passthru_opts=['coin']) t.license() t.view_tx('n') for cnum, wf in (('1', wf1), ('3', wf2)): @@ -1021,7 +1023,7 @@ class CmdTestMain(CmdTestBase, CmdTestShared): '--keys-from-file=' + non_mm_file, '--mmgen-keys-from-file=' + f6, f1, f2, f3, f4, f5] - t = self.spawn('mmgen-txsign', add_args) + t = self.spawn('mmgen-txsign', add_args, no_passthru_opts=['coin']) t.license() t.view_tx('t') t.do_decrypt_ka_data(pw=self.cfgs['14']['kapasswd']) @@ -1084,6 +1086,7 @@ class CmdTestMain(CmdTestBase, CmdTestShared): t = self.spawn( 'mmgen-txsign', add_args + ['-d', self.tmpdir, '-k', non_mm_file, txf, wf], + no_passthru_opts = ['coin'], exit_val = 2 if bad_vsize else None) t.license() t.view_tx('n') diff --git a/test/cmdtest_d/ct_regtest.py b/test/cmdtest_d/ct_regtest.py index 82fe606a..9f0e57cb 100755 --- a/test/cmdtest_d/ct_regtest.py +++ b/test/cmdtest_d/ct_regtest.py @@ -907,7 +907,8 @@ class CmdTestRegtest(CmdTestBase, CmdTestShared): def bob_subwallet_txsign(self): fn = get_file_with_ext(self.tmpdir, 'rawtx') - t = self.spawn('mmgen-txsign', ['-d', self.tmpdir, '--bob', '--subseeds=127', fn]) + t = self.spawn('mmgen-txsign', + ['-d', self.tmpdir, '--bob', '--subseeds=127', fn], no_passthru_opts=['coin']) t.view_tx('t') t.passphrase(dfl_wcls.desc, rt_pw) t.do_comment(None) @@ -2217,7 +2218,8 @@ class CmdTestRegtest(CmdTestBase, CmdTestShared): def bob_dump_hex_sign(self): txfile = get_file_with_ext(self.dump_hex_subdir, 'rawtx') return self.txsign_ui_common( - self.spawn('mmgen-txsign', ['-d', self.dump_hex_subdir, '--bob', txfile]), + self.spawn('mmgen-txsign', + ['-d', self.dump_hex_subdir, '--bob', txfile], no_passthru_opts=['coin']), do_passwd = True, passwd = rt_pw) diff --git a/test/cmdtest_d/ct_shared.py b/test/cmdtest_d/ct_shared.py index fb652be6..49e502ad 100755 --- a/test/cmdtest_d/ct_shared.py +++ b/test/cmdtest_d/ct_shared.py @@ -215,6 +215,7 @@ class CmdTestShared: 'mmgen-txsign', opts, extra_desc, + no_passthru_opts = ['coin'], exit_val = None if save or (wcls.enc and wcls.type != 'brain') else 1) t.license() t.view_tx(view)