config: add sync freelist cli flag

This commit is contained in:
Wilmer Paulino
2019-10-04 11:20:04 -04:00
parent fa96450db8
commit b63ed5ad56
3 changed files with 6 additions and 3 deletions

6
lnd.go
View File

@@ -190,6 +190,7 @@ func Main(lisCfg ListenerCfg) error {
graphDir,
channeldb.OptionSetRejectCacheSize(cfg.Caches.RejectCacheSize),
channeldb.OptionSetChannelCacheSize(cfg.Caches.ChannelCacheSize),
channeldb.OptionSetSyncFreelist(cfg.SyncFreelist),
)
if err != nil {
err := fmt.Errorf("Unable to open channeldb: %v", err)
@@ -1000,7 +1001,7 @@ func waitForWalletPassword(restEndpoints []net.Addr,
cfg.AdminMacPath, cfg.ReadMacPath, cfg.InvoiceMacPath,
}
pwService := walletunlocker.New(
chainConfig.ChainDir, activeNetParams.Params, true,
chainConfig.ChainDir, activeNetParams.Params, !cfg.SyncFreelist,
macaroonFiles,
)
lnrpc.RegisterWalletUnlockerServer(grpcServer, pwService)
@@ -1094,7 +1095,8 @@ func waitForWalletPassword(restEndpoints []net.Addr,
chainConfig.ChainDir, activeNetParams.Params,
)
loader := wallet.NewLoader(
activeNetParams.Params, netDir, true, recoveryWindow,
activeNetParams.Params, netDir, !cfg.SyncFreelist,
recoveryWindow,
)
// With the seed, we can now use the wallet loader to create