Fix lnd host config (#52)

* Fix lnd host config to not lookup ip by host

* Fix external lnd host
This commit is contained in:
Jonathan Zernik 2020-06-26 02:33:30 -07:00 committed by GitHub
parent 7a79f4b569
commit 1fcd601bac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 7 deletions

View file

@ -3,6 +3,7 @@ network=testnet
[lnd]
host=lnd
external_host=localhost
port=9735
rpc_port=10009
tls_cert_path=/root/.lnd/tls.cert

View file

@ -61,9 +61,9 @@ services:
- "btcd:blockchain"
entrypoint: ["./start-lnd.sh"]
lnd_sqkserver:
lnd:
image: lnd
container_name: lnd_sqkserver
container_name: lnd
build:
context: ../
dockerfile: docker/lnd/Dockerfile
@ -99,7 +99,7 @@ services:
- lnd_dir_sqkserver:/root/.lnd
- ./config.ini:/app/config.ini
links:
- "lnd_sqkserver:lnd"
- "lnd:lnd"
depends_on:
- db
sysctls:

View file

@ -38,12 +38,10 @@ def load_lightning_client(config) -> LNDLightningClient:
def load_lightning_host_port(config) -> LNDLightningClient:
if int(config['server']['price']) == 0:
return None
lnd_ip_address = socket.gethostbyname(
config['lnd']['host'],
)
lnd_host = config['lnd']['external_host'] or config['lnd']['host']
lnd_port = int(config['lnd']['port'])
return LightningAddressHostPort(
lnd_ip_address,
lnd_host,
lnd_port,
)