Skip to content

Commit

Permalink
statedb: avoid getting code directly from cache (#480)
Browse files Browse the repository at this point in the history
Signed-off-by: Ignacio Hagopian <[email protected]>
  • Loading branch information
jsign authored Sep 2, 2024
1 parent 9a8672f commit 47ef45f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/state/statedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ func (s *StateDB) updateStateObject(obj *stateObject) {
}
// Encode the account and update the account trie
addr := obj.Address()
if err := s.trie.UpdateAccount(addr, &obj.data, len(obj.code)); err != nil {
if err := s.trie.UpdateAccount(addr, &obj.data, len(s.GetCode(addr))); err != nil {
s.setError(fmt.Errorf("updateStateObject (%x) error: %v", addr[:], err))
}
if obj.dirtyCode {
Expand Down

0 comments on commit 47ef45f

Please sign in to comment.