1
0

daemon: default rpc socktype to "tcp" if rpcport is set

Having `rpcport` set already indicates the user does not want unix sockets,
we just default `rpchost` to "localhost".

related https://github.com/spesmilo/electrum/issues/7811
This commit is contained in:
SomberNight
2022-05-13 16:19:28 +02:00
parent c945f2292e
commit 641c3e23a4

View File

@@ -67,7 +67,7 @@ def get_rpcsock_defaultpath(config: SimpleConfig):
return os.path.join(config.path, 'daemon_rpc_socket')
def get_rpcsock_default_type(config: SimpleConfig):
if config.get('rpchost') and config.get('rpcport'):
if config.get('rpcport'):
return 'tcp'
# Use unix domain sockets when available,
# with the extra paranoia that in case windows "implements" them,