Lightning-Network

LIGHTNING LND 無法載入配置:lnd.conf:未知選項:logdir?

  • March 16, 2022

在我的 lnd.conf 中:

logdir=Z:\LND\logs

根據以下內容,logdir 是一個有效選項: sample-lnd.conf

但我得到:

Z:\LND> .\lnd --configfile=Z:\LND\lnd.conf
failed to load config: Z:\LND\lnd.conf:55: unknown option: logdir

我在 Windows 10 上執行 LND lnd-windows-amd64-v0.14.2-beta。我也收到此錯誤以及其他有效的 .conf 選項。

當我註釋掉有問題的選項時,LND 會按預期啟動:

Z:\LND> .\lnd --configfile=Z:\LND\lnd.conf
2022-03-16 09:28:54.763 [INF] LTND: Version: 0.14.2-beta commit=v0.14.2-beta, build=production, logging=default, debuglevel=info
2022-03-16 09:28:54.763 [INF] LTND: Active chain: Bitcoin (network=testnet)
2022-03-16 09:28:54.763 [INF] RPCS: RPC server listening on 127.0.0.1:10009
2022-03-16 09:28:54.763 [INF] RPCS: gRPC proxy started at 127.0.0.1:8080
2022-03-16 09:28:54.763 [INF] LTND: Opening the main database, this might take a few minutes...
2022-03-16 09:28:54.773 [INF] LTND: Opening bbolt database, sync_freelist=false, auto_compact=false
2022-03-16 09:28:54.773 [INF] LTND: Creating local graph and channel state DB instances
2022-03-16 09:28:54.783 [INF] CHDB: Checking for schema update: latest_version=24, db_version=24
2022-03-16 09:28:54.783 [INF] LTND: Database(s) now open (time_to_open=10.384ms)!
2022-03-16 09:28:54.783 [INF] LTND: We're not running within systemd
2022-03-16 09:28:54.783 [INF] LTND: Waiting for wallet encryption password. Use `lncli create` to create a wallet, `lncli unlock` to unlock an existing wallet, or `lncli changepassword` to change the password of an existing wallet and unlock it.

.conf 文件需要部分註釋。我一加:

[Application Options]
logdir=Z:\LND\logs

就在 logdir 選項上方,一切都相應地工作,並且 logdir 已按預期創建。

引用自:https://bitcoin.stackexchange.com/questions/112893