Skip to content

Commit

Permalink
vochain: appease the new go vet
Browse files Browse the repository at this point in the history
Go vet from master correctly points out that the call to time.Since
is not deferred, so it's always ~0ms.
  • Loading branch information
mvdan committed Jan 2, 2024
1 parent 1c88d5a commit 19daf48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vochain/state/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 19daf48

Please sign in to comment.