Skip to content

Commit

Permalink
log correct error
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-ogrady committed Nov 1, 2022
1 parent cfec0c2 commit d245acd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/state/state_object.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,10 @@ func (s *stateObject) GetCommittedState(db Database, key common.Hash) common.Has
// If the snapshot is unavailable or reading from it fails, load from the database.
if s.db.snap == nil || err != nil {
start := time.Now()
snapErr := err
enc, err = s.getTrie(db).TryGet(key.Bytes())
if metrics.EnabledExpensive {
log.Warn("reading storage from trie", "snap missing", s.db.snap == nil, "err", err)
log.Warn("reading storage from trie", "snap missing", s.db.snap == nil, "err", snapErr)
s.db.StorageReads += time.Since(start)
}
if err != nil {
Expand Down

0 comments on commit d245acd

Please sign in to comment.