Merge pull request #4309 from Roasbeef/restore-open-time

lnd: fix regression in DB open time logs
This commit is contained in:
Olaoluwa Osuntokun
2020-05-26 11:27:17 -07:00
committed by GitHub

2
lnd.go
View File

@@ -250,6 +250,7 @@ func Main(cfg *Config, lisCfg ListenerCfg, shutdownChan <-chan struct{}) error {
ltndLog.Infof("Opening the main database, this might take a few " +
"minutes...")
startOpenTime := time.Now()
chanDbBackend, err := cfg.DB.GetBackend(
cfg.localDatabaseDir(), cfg.networkName(),
)
@@ -260,7 +261,6 @@ func Main(cfg *Config, lisCfg ListenerCfg, shutdownChan <-chan struct{}) error {
// Open the channeldb, which is dedicated to storing channel, and
// network related metadata.
startOpenTime := time.Now()
chanDB, err := channeldb.CreateWithBackend(
chanDbBackend,
channeldb.OptionSetRejectCacheSize(cfg.Caches.RejectCacheSize),