From 5e4d5952be5b9d590cfa7511efcfb55ed77dfcdf Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Mon, 30 Dec 2024 11:31:39 +0000 Subject: [PATCH] addrimport: remove `segwit_is_active` requirement --- mmgen/addr.py | 2 +- mmgen/main_addrimport.py | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/mmgen/addr.py b/mmgen/addr.py index fa83959f..f9f3245c 100755 --- a/mmgen/addr.py +++ b/mmgen/addr.py @@ -172,7 +172,7 @@ class CoinAddr(HiliteStr, InitErrors, MMGenObject): me.proto = proto return me except Exception as e: - return cls.init_fail(e, addr, objname=f'{proto.cls_name} address') + return cls.init_fail(e, addr, objname=f'{proto.name} {proto.cls_name} address') @property def parsed(self): diff --git a/mmgen/main_addrimport.py b/mmgen/main_addrimport.py index ab887361..65d9faee 100755 --- a/mmgen/main_addrimport.py +++ b/mmgen/main_addrimport.py @@ -84,11 +84,7 @@ addrimport_msgs = { def parse_cmd_args(rpc, cmd_args): def import_mmgen_list(infile): - al = (AddrList, KeyAddrList)[bool(cfg.keyaddr_file)](cfg, proto, infile) - if al.al_id.mmtype in ('S', 'B'): - if not rpc.info('segwit_is_active'): - die(2, 'Segwit is not active on this chain. Cannot import Segwit addresses') - return al + return (AddrList, KeyAddrList)[bool(cfg.keyaddr_file)](cfg, proto, infile) if len(cmd_args) == 1: infile = cmd_args[0]