lightninglabs / loop

Lightning Loop: A Non-Custodial Off/On Chain Bridge
MIT License
558 stars 116 forks source link

Settings in config file seem to be ignored #412

Closed Kixunil closed 3 years ago

Kixunil commented 3 years ago

I have this config file:

network=regtest
datadir=/var/lib/loopd-system-regtest
rpclisten=0.0.0.0:11012
restlisten=0.0.0.0:11112
tlscertpath=/var/lib/loopd-system-regtest/loop.cert
tlskeypath=/var/lib/loopd-system-regtest/loop.key

lnd.host=127.0.0.1:10011

lnd.tlspath=/var/lib/lnd-system-regtest/public/tls.cert

lnd.macaroonpath=/var/lib/lnd-system-regtest/private/admin.macaroon

The lnd.* options seem to be ignored.

When I attempt to launch loopd

Expected behavior

loopd reads certificate from /var/lib/lnd-system-regtest/public/tls.cert, macaron from /var/lib/lnd-system-regtest/private/admin.macaroon and connects to 127.0.0.1:10011

Actual behavior

loopd attempts to connect to 127.0.0.1:10009 and read /var/lib/loopd-system-regtest/.lnd/tls.cert

Log output:

2021-08-03 14:29:21.840 [INF] LOOPD: Version: 0.14.2-beta commit=
2021-08-03 14:29:21.840 [INF] LNDC: Creating lnd connection to localhost:10009
loopd exited with an error: open /var/lib/loopd-system-regtest/.lnd/tls.cert: no such file or directory

To reproduce

Create the configuration file above and launch loopd with argument --configfile /etc/loopd-system-regtest/loopd.conf

System information

guggero commented 3 years ago

The config file format is a bit weird, it's parsed as an INI file... Does it work if you add a section header ([lnd]) before any lnd.* entries?

Kixunil commented 3 years ago

Damn, I just realized I forgot to change permissions so presumably it got permission denied and instead of failing it silently continued doing something weird.