From bbc4f0687248481e2594fbf6904c6bd46016e083 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Fri, 22 May 2020 15:18:23 -0700 Subject: [PATCH] lnd: fix regression in DB open time logs In this commit, we fix a regression in our DB open time logging that was introduced in #4015. Obtaining the target backend from the configuration will actually also open the database, so we need to include that in the time delta as well. --- lnd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lnd.go b/lnd.go index a58d5cbd23..75b757b41b 100644 --- a/lnd.go +++ b/lnd.go @@ -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),