whitespace, comments, formatting (minor)

This commit is contained in:
The MMGen Project 2026-09-13 15:50:13 +00:00
commit 4a667873d1
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
8 changed files with 23 additions and 19 deletions

View file

@ -200,11 +200,11 @@ class Config(Lockable):
# debug
debug = False
debug_addrlist = False
debug_daemon = False
debug_evm = False
debug_opts = False
debug_rpc = False
debug_addrlist = False
debug_subseed = False
debug_tw = False
devtools = False

View file

@ -150,7 +150,8 @@ def compile_code(cfg, code):
cfg._util.vmsg(out)
def main():
cfg = Config(opts_data=opts_data)
cfg = Config(
opts_data = opts_data)
if cfg.check_solc_version:
sys.exit(0 if check_solc_version() else 1)

View file

@ -34,7 +34,8 @@ opts_data = {
cfg = Config(
opts_data = opts_data,
need_proto = False,
init_opts = {'skip_cfg_file': True})
init_opts = {
'skip_cfg_file': True})
from test.overlay import get_overlay_tree_dir
overlay_tree_dir = get_overlay_tree_dir(repo_root)

View file

@ -183,12 +183,7 @@ class CmdTestRef3Seed(CmdTestBase, CmdTestShared):
pat = re_pat.format(sid, slen)
assert re.match(pat, fn), f'{pat} != {fn}'
else:
cmp_or_die('{}[{}]{}.{}'.format(
sid,
slen,
'-α' if self.cfg.debug_utf8 else '',
wcls.ext),
fn)
cmp_or_die('{}[{}]{}.{}'.format(sid, slen, '-α' if self.cfg.debug_utf8 else '', wcls.ext), fn)
return t
def ref_walletconv_words(self):

View file

@ -693,9 +693,12 @@ class CmdTestRegtest(CmdTestBase, CmdTestShared):
for mmtype in mmtypes or proto.mmtypes:
desc = MMGenAddrType.mmtypes[mmtype].name
addrfile = joinpath(self._user_dir(user),
'{}{}{}[{}]{x}.regtest.addrs'.format(
sid, self.get_altcoin_pfx(proto.coin), id_strs[desc], addr_range,
x='-α' if self.cfg.debug_utf8 else ''))
'{}{}{}[{}]{}.regtest.addrs'.format(
sid,
self.get_altcoin_pfx(proto.coin),
id_strs[desc],
addr_range,
'-α' if self.cfg.debug_utf8 else ''))
if mmtype == proto.mmtypes[0] and user == 'bob':
self._add_comments_to_addr_file(proto, addrfile, addrfile, use_comments=True)
t = self.spawn(
@ -1176,8 +1179,12 @@ class CmdTestRegtest(CmdTestBase, CmdTestShared):
def get_addr_from_addrlist(self, user, sid, mmtype, idx, addr_range='1-5', proto=None):
proto = proto or self.proto
id_str = {'L':'', 'S':'-S', 'C':'-C', 'B':'-B'}[mmtype]
ext = '{}{}{}[{}]{x}.regtest.addrs'.format(
sid, self.get_altcoin_pfx(proto.coin), id_str, addr_range, x='-α' if self.cfg.debug_utf8 else '')
ext = '{}{}{}[{}]{}.regtest.addrs'.format(
sid,
self.get_altcoin_pfx(proto.coin),
id_str,
addr_range,
'-α' if self.cfg.debug_utf8 else '')
addrfile = get_file_with_ext(self._user_dir(user), ext, no_dot=True)
silence()
addr = AddrList(self.cfg, proto, infile=addrfile).data[idx].addr

View file

@ -151,4 +151,7 @@ def main():
for network_id in ids:
run(network_id=network_id.lower())
cfg = Config(opts_data=opts_data, init_opts={'skip_cfg_file': True})
cfg = Config(
opts_data = opts_data,
init_opts = {
'skip_cfg_file': True})

View file

@ -109,8 +109,7 @@ proto_cmds = (
'txdo',
'txsend',
'txsign',
'xmrwallet',
)
'xmrwallet')
def getrand(n):
if cfg.test_suite_deterministic:

View file

@ -26,8 +26,6 @@ os.environ['MMGEN_TEST_SUITE_LEGACY_TX'] = '1'
from .test_init import repo_root
# for the unit tests, violate MMGen Project best practices and allow use of the dev tools
# in production code:
if not os.getenv('MMGEN_DEVTOOLS'):
from mmgen.devinit import init_dev
init_dev()