From 56746d92ae8330f1650c833f5d922a6c29887c78 Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Fri, 24 Mar 2023 20:31:10 +0000 Subject: [PATCH] MoneroRPCClient: add `proto` param to constructor --- mmgen/proto/xmr/daemon.py | 1 + mmgen/proto/xmr/rpc.py | 3 +++ mmgen/xmrwallet.py | 2 ++ test/test_py_d/ts_xmrwallet.py | 1 + test/unit_tests_d/ut_rpc.py | 1 + 5 files changed, 8 insertions(+) diff --git a/mmgen/proto/xmr/daemon.py b/mmgen/proto/xmr/daemon.py index 7411c9a5..74bcbb14 100755 --- a/mmgen/proto/xmr/daemon.py +++ b/mmgen/proto/xmr/daemon.py @@ -46,6 +46,7 @@ class monero_daemon(CoinDaemon): from .rpc import MoneroRPCClient self.rpc = MoneroRPCClient( + proto = self.proto, host = self.host, port = self.rpc_port, user = None, diff --git a/mmgen/proto/xmr/rpc.py b/mmgen/proto/xmr/rpc.py index 061fbc83..941c7fc6 100755 --- a/mmgen/proto/xmr/rpc.py +++ b/mmgen/proto/xmr/rpc.py @@ -22,6 +22,7 @@ class MoneroRPCClient(RPCClient): def __init__( self, + proto, host, port, user, @@ -30,6 +31,8 @@ class MoneroRPCClient(RPCClient): proxy = None, daemon = None ): + self.proto = proto + if proxy is not None: self.proxy = IPPort(proxy) test_connection = False diff --git a/mmgen/xmrwallet.py b/mmgen/xmrwallet.py index 081bd7a1..a9e323b6 100755 --- a/mmgen/xmrwallet.py +++ b/mmgen/xmrwallet.py @@ -629,6 +629,7 @@ class MoneroWalletOps: host,port = uopt.daemon.split(':') if uopt.daemon else ('localhost',self.wd.daemon_port) self.dc = MoneroRPCClient( + proto = self.proto, host = host, port = int(port), user = None, @@ -936,6 +937,7 @@ class MoneroWalletOps: proxy = None self.dc = MoneroRPCClient( + proto = self.proto, host = host, port = int(port), user = None, diff --git a/test/test_py_d/ts_xmrwallet.py b/test/test_py_d/ts_xmrwallet.py index 004d2091..4db9976f 100755 --- a/test/test_py_d/ts_xmrwallet.py +++ b/test/test_py_d/ts_xmrwallet.py @@ -223,6 +223,7 @@ class TestSuiteXMRWallet(TestSuiteBase): datadir = datadir ) md_rpc = MoneroRPCClient( + proto = self.proto, host = md.host, port = md.rpc_port, user = None, diff --git a/test/unit_tests_d/ut_rpc.py b/test/unit_tests_d/ut_rpc.py index 6621babb..dfb8756f 100755 --- a/test/unit_tests_d/ut_rpc.py +++ b/test/unit_tests_d/ut_rpc.py @@ -161,6 +161,7 @@ class unit_tests: def test_monerod_rpc(md): rpc = MoneroRPCClient( + proto = md.proto, host = md.host, port = md.rpc_port, user = None,