Browse Source

rpc: remove localhost override for test suite, regtest

The MMGen Project 2 weeks ago
parent
commit
5a436b9673
2 changed files with 2 additions and 4 deletions
  1. 1 3
      mmgen/proto/btc/rpc.py
  2. 1 1
      mmgen/proto/eth/rpc.py

+ 1 - 3
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()

+ 1 - 1
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)