From 5529e7ed9f1c99a1b3f5635bb8b1b49b98725c8a Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Sun, 26 Oct 2025 10:35:54 +0000 Subject: [PATCH] minor fixes and cleanups --- mmgen/proto/btc/rpc/local.py | 16 ++++++++++++---- mmgen/proto/eth/daemon.py | 2 +- test/cmdtest_d/base.py | 2 +- test/cmdtest_d/main.py | 6 +++++- test/modtest_d/tx.py | 2 +- 5 files changed, 20 insertions(+), 8 deletions(-) diff --git a/mmgen/proto/btc/rpc/local.py b/mmgen/proto/btc/rpc/local.py index 64c48048..154b66b7 100755 --- a/mmgen/proto/btc/rpc/local.py +++ b/mmgen/proto/btc/rpc/local.py @@ -75,13 +75,21 @@ class CallSigs: descriptors, # 6. descriptors (native descriptor wallet) load_on_startup) # 7. load_on_startup + # Get detailed information about in-wallet transaction + # Arguments: + # 1. txid (string, required) The transaction id + # 2. include_watchonly (boolean, optional, default=true for watch-only wallets, otherwise + # false) Whether to include watch-only addresses in balance calculation + # and details[] + # 3. verbose (boolean, optional, default=false) Whether to include a `decoded` + # field containing the decoded transaction (equivalent to RPC + # decoderawtransaction) def gettransaction(self, txid, include_watchonly, verbose): return ( 'gettransaction', - txid, # 1. transaction id - include_watchonly, # 2. optional, default=true for watch-only wallets, otherwise false - verbose) # 3. optional, default=false -- include a `decoded` field containing - # => the decoded transaction (equivalent to RPC decoderawtransaction) + txid, + include_watchonly, + verbose) class litecoin_core(bitcoin_core): diff --git a/mmgen/proto/eth/daemon.py b/mmgen/proto/eth/daemon.py index cd31219d..e176a355 100755 --- a/mmgen/proto/eth/daemon.py +++ b/mmgen/proto/eth/daemon.py @@ -130,7 +130,7 @@ class geth_daemon(ethereum_daemon): ) class reth_daemon(geth_daemon): - daemon_data = _dd('Reth', 1008020, '1.8.2') + daemon_data = _dd('Reth', 1008002, '1.8.2') version_pat = r'reth/v(\d+)\.(\d+)\.(\d+)' exec_fn = 'reth' version_info_arg = '--version' diff --git a/test/cmdtest_d/base.py b/test/cmdtest_d/base.py index eef7f754..70a0d708 100755 --- a/test/cmdtest_d/base.py +++ b/test/cmdtest_d/base.py @@ -43,7 +43,7 @@ class CmdTestBase: is_helper = False def __init__(self, cfg, trunner, cfgs, spawn): - if hasattr(self, 'name'): # init will be called multiple times for classes with multiple inheritance + if hasattr(self, 'name'): # init may called multiple times return self.name = type(self).__name__ self.cfg = cfg diff --git a/test/cmdtest_d/main.py b/test/cmdtest_d/main.py index 9ef09bf4..1c25ad29 100755 --- a/test/cmdtest_d/main.py +++ b/test/cmdtest_d/main.py @@ -778,7 +778,11 @@ class CmdTestMain(CmdTestBase, CmdTestShared): if not self.proto.cap('rbf'): msg(gray('Skipping RBF')) return 'skip' - args = prepend_args + ['--quiet', '--outdir='+self.tmpdir, txfile] + seed_args + args = prepend_args + [ + '--quiet', + '--outdir='+self.tmpdir, + txfile + ] + seed_args t = self.spawn('mmgen-txbump', args) if seed_args: t.do_decrypt_ka_data(pw=self.cfgs['14']['kapasswd']) diff --git a/test/modtest_d/tx.py b/test/modtest_d/tx.py index c93d4fc2..b2b7cbf1 100755 --- a/test/modtest_d/tx.py +++ b/test/modtest_d/tx.py @@ -146,7 +146,7 @@ class unit_tests: 'data:', 'hexdata:', 'data:' + 'x' * (max_len + 1), - 'hexdata:' + ('deadbeef' * 20) + 'ee', + 'hexdata:' + ('deadbeef' * (max_len // 4)) + 'ee', 'hex:0abc', 'da:xyz', 'hexdata:xyz',