From a4b1e1fefef15fa7699f3e2f5ef7e92afa564ebe Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Tue, 27 Oct 2026 13:30:09 +0000 Subject: [PATCH] minor cleanups --- mmgen/proto/btc/rpc/local.py | 10 +++++----- mmgen/tx/online.py | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/mmgen/proto/btc/rpc/local.py b/mmgen/proto/btc/rpc/local.py index 785914d4..8641a7fd 100644 --- a/mmgen/proto/btc/rpc/local.py +++ b/mmgen/proto/btc/rpc/local.py @@ -382,12 +382,12 @@ class BitcoinRPCClient(RPCClient, metaclass=AsyncInit): def segwit_is_active(): for test in [ - lambda: self.cfg.test_suite and self.chain != 'regtest', - lambda: self.cached['deploymentinfo']['deployments']['segwit']['active'], - lambda: self.cached['blockchaininfo']['softforks']['segwit']['active'], - lambda: self.cached['blockchaininfo']['bip9_softforks']['segwit']['status'] == 'active']: + lambda d: self.cfg.test_suite and self.chain != 'regtest', + lambda d: d['deploymentinfo']['deployments']['segwit']['active'], + lambda d: d['blockchaininfo']['softforks']['segwit']['active'], + lambda d: d['blockchaininfo']['bip9_softforks']['segwit']['status'] == 'active']: try: - if test(): + if test(self.cached): return True except (TypeError, KeyError): pass diff --git a/mmgen/tx/online.py b/mmgen/tx/online.py index 7cd7dbed..86dd183f 100644 --- a/mmgen/tx/online.py +++ b/mmgen/tx/online.py @@ -82,8 +82,9 @@ class OnlineSigned(Signed): async def send(self, cfg, asi, batch=False): """ - returns integer exit val to system + returns an integer exit value to the system """ + status_exitval = None sent_status = None all_ok = True