rpc: remove localhost override for test suite, regtest

This commit is contained in:
The MMGen Project 2025-02-24 11:27:48 +00:00
commit 5a436b9673
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
2 changed files with 2 additions and 4 deletions

View file

@ -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()

View file

@ -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)