diff --git a/core/state/state_object.go b/core/state/state_object.go index 707e42dbaa..6444690727 100644 --- a/core/state/state_object.go +++ b/core/state/state_object.go @@ -74,7 +74,6 @@ type stateObject struct { originStorage Storage // Storage cache of original entries to dedup rewrites pendingStorage Storage // Storage entries that need to be flushed to disk, at the end of an entire block dirtyStorage Storage // Storage entries that have been modified in the current transaction execution, reset for every transaction - readStorage []common.Hash // Cache flags. dirtyCode bool // true if the code was updated @@ -112,7 +111,6 @@ func newObject(db *StateDB, address common.Address, acct *types.StateAccount) *s originStorage: make(Storage), pendingStorage: make(Storage), dirtyStorage: make(Storage), - readStorage: []common.Hash{}, } } @@ -259,22 +257,12 @@ func (s *stateObject) finalise(prefetch bool) { } } - // prefetch slots that are read so that they will appear in witness - for _, value := range s.readStorage { - if _, ok := s.dirtyStorage[value]; !ok { - slotsToPrefetch = append(slotsToPrefetch, common.CopyBytes(value[:])) - } - } - if s.db.prefetcher != nil && prefetch && len(slotsToPrefetch) > 0 && s.data.Root != types.EmptyRootHash { s.db.prefetcher.prefetch(s.addrHash, s.data.Root, s.address, slotsToPrefetch) } if len(s.dirtyStorage) > 0 { s.dirtyStorage = make(Storage) } - if len(s.readStorage) > 0 { - s.readStorage = []common.Hash{} - } } // updateTrie is responsible for persisting cached storage changes into the