diff --git a/lnd.go b/lnd.go index f72b57a3..16a47a43 100644 --- a/lnd.go +++ b/lnd.go @@ -222,9 +222,12 @@ func Main(lisCfg ListenerCfg) error { defaultGraphSubDirname, normalizeNetwork(activeNetParams.Name)) + ltndLog.Infof("Opening the main database, this might take a few " + + "minutes...") + // Open the channeldb, which is dedicated to storing channel, and // network related metadata. - ltndLog.Infof("Opening the channeldb, might take a few minutes") + startOpenTime := time.Now() chanDB, err := channeldb.Open( graphDir, channeldb.OptionSetRejectCacheSize(cfg.Caches.RejectCacheSize), @@ -238,6 +241,9 @@ func Main(lisCfg ListenerCfg) error { } defer chanDB.Close() + openTime := time.Now().Sub(startOpenTime) + ltndLog.Infof("Database now open (time_to_open=%v)!", openTime) + // Only process macaroons if --no-macaroons isn't set. ctx := context.Background() ctx, cancel := context.WithCancel(ctx)