Skip to content

Commit

Permalink
add logging for trie fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-ogrady committed Nov 1, 2022
1 parent a335b6a commit 2df4b44
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/state/state_object.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import (
"github.com/ava-labs/subnet-evm/trie"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/rlp"
)

Expand Down Expand Up @@ -238,6 +239,7 @@ func (s *stateObject) GetCommittedState(db Database, key common.Hash) common.Has
start := time.Now()
enc, err = s.getTrie(db).TryGet(key.Bytes())
if metrics.EnabledExpensive {
log.Warn("reading storage from trie", "snap exists", s.db.snap == nil, "err", err)
s.db.StorageReads += time.Since(start)
}
if err != nil {
Expand Down

0 comments on commit 2df4b44

Please sign in to comment.