Support BCH cashaddr format

This commit is contained in:
The MMGen Project 2024-09-29 14:29:10 +00:00
commit 92fdfc047e
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
4 changed files with 6 additions and 6 deletions

View file

@ -1 +1 @@
3.4.0
3.5.dev1

View file

@ -38,7 +38,7 @@ def do_output(proto,addr_data,blk_hdrs):
indent = ' ' * (col1w + 2)
for n,(addr,unspents) in enumerate(addr_data.items(),1):
Msg(f'\n{n:{col1w}}) Address: {addr.hl()}')
Msg(f'\n{n:{col1w}}) Address: {addr.hl(addr.view_pref)}')
if unspents:
heights = { u['height'] for u in unspents }
@ -93,7 +93,7 @@ def do_output_tabular(proto,addr_data,blk_hdrs):
if unspents:
Msg(fs.format(
n = str(n) + ')',
a = addr.fmt(width=max_addrw,color=True),
a = addr.fmt(addr.view_pref, width=max_addrw, color=True),
u = red(str(len(unspents)).rjust(5)),
b = unspents[0]['height'],
t = make_timestr( blk_hdrs[unspents[0]['height']]['time'] ),
@ -104,7 +104,7 @@ def do_output_tabular(proto,addr_data,blk_hdrs):
else:
Msg(fs.format(
n = str(n) + ')',
a = addr.fmt(width=max_addrw,color=True),
a = addr.fmt(addr.view_pref, width=max_addrw, color=True),
u = ' -',
b = '-',
t = '',

View file

@ -38,7 +38,7 @@ python_requires = >=3.9
include_package_data = True
install_requires =
mmgen-wallet==15.0.0
mmgen-wallet>=15.1.dev1
pyyaml
yahooquery

View file

@ -112,7 +112,7 @@ class CmdTestRegtest(CmdTestBase):
if cfg._proto.testnet:
die(2,'--testnet and --regtest options incompatible with regtest test suite')
self.proto = init_proto( cfg, self.proto.coin, network='regtest', need_amt=True )
self.addrs = gen_addrs(self.proto,'regtest',[1,2,3,4,5])
self.addrs = [a.views[a.view_pref] for a in gen_addrs(self.proto,'regtest',[1,2,3,4,5])]
self.use_bdb_wallet = self.bdb_wallet or self.proto.coin != 'BTC'
self.regtest = MMGenRegtest(cfg, self.proto.coin, bdb_wallet=self.use_bdb_wallet)