From aed860093173b7b386e848afc476bac97e208a8f Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Fri, 24 Mar 2023 20:31:09 +0000 Subject: [PATCH] proto.xmr: whitespace --- mmgen/proto/xmr/daemon.py | 5 ++++- mmgen/proto/xmr/rpc.py | 10 +++++++++- mmgen/xmrwallet.py | 6 +++++- test/unit_tests_d/ut_rpc.py | 5 ++--- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/mmgen/proto/xmr/daemon.py b/mmgen/proto/xmr/daemon.py index 593fe419..c8f2c92d 100755 --- a/mmgen/proto/xmr/daemon.py +++ b/mmgen/proto/xmr/daemon.py @@ -83,7 +83,10 @@ class MoneroWalletDaemon(RPCDaemon): networks = ('mainnet','testnet') rpc_ports = _nw(13131, 13141, None) # testnet is non-standard - def __init__(self, proto, wallet_dir, + def __init__( + self, + proto, + wallet_dir, test_suite = False, host = None, user = None, diff --git a/mmgen/proto/xmr/rpc.py b/mmgen/proto/xmr/rpc.py index cce4dacf..59c1305c 100755 --- a/mmgen/proto/xmr/rpc.py +++ b/mmgen/proto/xmr/rpc.py @@ -20,7 +20,15 @@ class MoneroRPCClient(RPCClient): network_proto = 'https' verify_server = False - def __init__(self,host,port,user,passwd,test_connection=True,proxy=None,daemon=None): + def __init__( + self, + host, + port, + user, + passwd, + test_connection = True, + proxy = None, + daemon = None ): if proxy is not None: self.proxy = IPPort(proxy) diff --git a/mmgen/xmrwallet.py b/mmgen/xmrwallet.py index e821e595..8c6ee687 100755 --- a/mmgen/xmrwallet.py +++ b/mmgen/xmrwallet.py @@ -628,7 +628,11 @@ class MoneroWalletOps: super().__init__(uarg_tuple,uopt_tuple) host,port = uopt.daemon.split(':') if uopt.daemon else ('localhost',self.wd.daemon_port) - self.dc = MoneroRPCClientRaw(host=host, port=int(port), user=None, passwd=None) + self.dc = MoneroRPCClient( + host = host, + port = int(port), + user = None, + passwd = None ) self.accts_data = {} async def process_wallet(self,d,fn,last): diff --git a/test/unit_tests_d/ut_rpc.py b/test/unit_tests_d/ut_rpc.py index 0f4b7af7..38bf5999 100755 --- a/test/unit_tests_d/ut_rpc.py +++ b/test/unit_tests_d/ut_rpc.py @@ -44,9 +44,6 @@ def cfg_file_auth_test(proto,d,bad_auth=False): def print_daemon_info(rpc): - def fmt_dict(d): - return '\n ' + '\n '.join( pp_fmt(d).split('\n') ) + '\n' - msg(f""" DAEMON VERSION: {rpc.daemon_version} [{rpc.daemon_version_str}] CAPS: {rpc.caps} @@ -57,6 +54,8 @@ def print_daemon_info(rpc): """.rstrip()) if rpc.proto.base_proto == 'Bitcoin': + def fmt_dict(d): + return '\n ' + '\n '.join( pp_fmt(d).split('\n') ) + '\n' msg(f""" NETWORKINFO: {fmt_dict(rpc.cached["networkinfo"])} BLOCKCHAININFO: {fmt_dict(rpc.cached["blockchaininfo"])}