Skip to content
This repository was archived by the owner on Aug 2, 2021. It is now read-only.

Commit c1f1418

Browse files
fjlgbalint
authored andcommitted
core/state: cache missing storage entries (#16584)
1 parent 8a0e671 commit c1f1418

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

core/state/state_object.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,7 @@ func (self *stateObject) GetState(db Database, key common.Hash) common.Hash {
178178
}
179179
value.SetBytes(content)
180180
}
181-
if (value != common.Hash{}) {
182-
self.cachedStorage[key] = value
183-
}
181+
self.cachedStorage[key] = value
184182
return value
185183
}
186184

@@ -197,7 +195,6 @@ func (self *stateObject) SetState(db Database, key, value common.Hash) {
197195
func (self *stateObject) setState(key, value common.Hash) {
198196
self.cachedStorage[key] = value
199197
self.dirtyStorage[key] = value
200-
201198
}
202199

203200
// updateTrie writes cached storage modifications into the object's storage trie.

0 commit comments

Comments
 (0)