From 19daf48ef0f8c6bdd308778dc36290497d9ce580 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Sat, 30 Dec 2023 01:14:38 +0100 Subject: [PATCH] vochain: appease the new go vet Go vet from master correctly points out that the call to time.Since is not deferred, so it's always ~0ms. --- vochain/state/state.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vochain/state/state.go b/vochain/state/state.go index fe592a787..241b14c63 100644 --- a/vochain/state/state.go +++ b/vochain/state/state.go @@ -152,7 +152,7 @@ func initStateDB(database db.Database) (*statedb.StateDB, error) { log.Infof("initializing StateDB") sdb := statedb.NewStateDB(database) startTime := time.Now() - defer log.Infof("state database load took %s", time.Since(startTime)) + defer func() { log.Infof("state database load took %s", time.Since(startTime)) }() root, err := sdb.Hash() if err != nil { return nil, err