fix specter.node has no _get_rpc() (#2327)

* fix specter.node has no _get_rpc()

* fixes #2123

* black

---------

Co-authored-by: Kim Neunert <kim@swanbitcoin.com>
This commit is contained in:
k9ert 2023-05-01 13:47:02 +02:00 committed by GitHub
parent 6202c06abb
commit 82d0fe385c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -80,7 +80,7 @@ def login_method_rpcpasswordaspin():
# This can be overridden via ENV_var.
specter: Specter = app.specter
if specter.node and specter.node._get_rpc().test_connection():
if specter.node and specter.node.rpc and specter.node._get_rpc().test_connection():
rpc = specter.node._get_rpc().clone()
else:
confs = _detect_rpc_confs_via_datadir(

View file

@ -62,7 +62,7 @@ class SpectrumNode(AbstractNode):
datadir=datadir,
app=app,
proxy_url=app.specter.proxy_url
if app.specter.tor_type != "none"
if app.specter.tor_type != "none" and app.specter.tor_type != "disabled"
else None,
)
logger.debug(f"{self.name} is instantiating its BridgeRPC.")