Browse Source

addrimport: remove `segwit_is_active` requirement

The MMGen Project 3 months ago
parent
commit
5e4d5952be
2 changed files with 2 additions and 6 deletions
  1. 1 1
      mmgen/addr.py
  2. 1 5
      mmgen/main_addrimport.py

+ 1 - 1
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):

+ 1 - 5
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]