Skip to content

Commit

Permalink
feat: return state object trie for no update
Browse files Browse the repository at this point in the history
  • Loading branch information
joeylichang committed Sep 17, 2024
1 parent b8f5b6a commit cad1e3e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/state/state_object.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,11 @@ func (s *stateObject) updateTrie() (Trie, error) {
s.db.setError(err)
return nil, err
}

if len(s.pendingStorage) == 0 {
return s.trie, nil
}

// Insert all the pending storage updates into the trie
usedStorage := make([][]byte, 0, len(s.pendingStorage))
dirtyStorage := make(map[common.Hash][]byte)
Expand Down

0 comments on commit cad1e3e

Please sign in to comment.