Skip to content

Commit

Permalink
core/state: cache missing storage entries (ethereum#16584)
Browse files Browse the repository at this point in the history
  • Loading branch information
fjl authored and kimmyeonghun committed Jul 3, 2018
1 parent 58c34e1 commit da9650b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions core/state/state_object.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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.
Expand Down

0 comments on commit da9650b

Please sign in to comment.