core/state: cache missing storage entries (#16584)

pull/16588/head
Felix Lange 7 years ago committed by Péter Szilágyi
parent 86be91b3e2
commit b724d1aada
  1. 5
      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.

Loading…
Cancel
Save