From 5a436b9673b6f65fad3ab213223d7b415d4e395c Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Mon, 24 Feb 2025 11:27:48 +0000 Subject: [PATCH] rpc: remove localhost override for test suite, regtest --- mmgen/proto/btc/rpc.py | 4 +--- mmgen/proto/eth/rpc.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/mmgen/proto/btc/rpc.py b/mmgen/proto/btc/rpc.py index 96c1c450..20c31a66 100755 --- a/mmgen/proto/btc/rpc.py +++ b/mmgen/proto/btc/rpc.py @@ -128,9 +128,7 @@ class BitcoinRPCClient(RPCClient, metaclass=AsyncInit): super().__init__( cfg = cfg, - host = ( - 'localhost' if cfg.test_suite or cfg.network == 'regtest' - else (proto.rpc_host or cfg.rpc_host or 'localhost')), + host = proto.rpc_host or cfg.rpc_host or 'localhost', port = daemon.rpc_port) self.set_auth() diff --git a/mmgen/proto/eth/rpc.py b/mmgen/proto/eth/rpc.py index 3165c2cd..fa583ef9 100755 --- a/mmgen/proto/eth/rpc.py +++ b/mmgen/proto/eth/rpc.py @@ -48,7 +48,7 @@ class EthereumRPCClient(RPCClient, metaclass=AsyncInit): super().__init__( cfg = cfg, - host = 'localhost' if cfg.test_suite else (proto.rpc_host or cfg.rpc_host or 'localhost'), + host = proto.rpc_host or cfg.rpc_host or 'localhost', port = daemon.rpc_port) await self.set_backend_async(backend)