diff options
author | Felix Lange <fjl@users.noreply.github.com> | 2018-04-27 17:13:23 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-04-27 17:13:23 +0800 |
commit | b724d1aadac483984e7ea19931298dea43e3d280 (patch) | |
tree | e3a8ec52a47693c9fc696e16d5e76f55666e4ce5 /core | |
parent | 86be91b3e2dff5df28ee53c59df1ecfe9f97e007 (diff) | |
download | go-tangerine-b724d1aadac483984e7ea19931298dea43e3d280.tar.gz go-tangerine-b724d1aadac483984e7ea19931298dea43e3d280.tar.zst go-tangerine-b724d1aadac483984e7ea19931298dea43e3d280.zip |
core/state: cache missing storage entries (#16584)
Diffstat (limited to 'core')
-rw-r--r-- | core/state/state_object.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/core/state/state_object.go b/core/state/state_object.go index 3c40c2041..5d203fddd 100644 --- a/core/state/state_object.go +++ b/core/state/state_object.go @@ -178,9 +178,7 @@ func (self *stateObject) GetState(db Database, key common.Hash) common.Hash { } value.SetBytes(content) } - if (value != common.Hash{}) { - self.cachedStorage[key] = value - } + self.cachedStorage[key] = value return value } @@ -197,7 +195,6 @@ func (self *stateObject) SetState(db Database, key, value common.Hash) { func (self *stateObject) setState(key, value common.Hash) { self.cachedStorage[key] = value self.dirtyStorage[key] = value - } // updateTrie writes cached storage modifications into the object's storage trie. |