mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-25 04:57:17 +00:00
Merge pull request #3009 from Gustav-Simonsson/fix_oom_in_light
light: fix memory expansion bug (same as fix for core/state)
This commit is contained in:
commit
3778f1bf77
@ -261,7 +261,9 @@ func (self *LightState) Copy() *LightState {
|
||||
state := NewLightState(common.Hash{}, self.odr)
|
||||
state.trie = self.trie
|
||||
for k, stateObject := range self.stateObjects {
|
||||
state.stateObjects[k] = stateObject.Copy()
|
||||
if stateObject.dirty {
|
||||
state.stateObjects[k] = stateObject.Copy()
|
||||
}
|
||||
}
|
||||
|
||||
return state
|
||||
|
@ -186,7 +186,7 @@ func (self *StateObject) Copy() *StateObject {
|
||||
stateObject.codeHash = common.CopyBytes(self.codeHash)
|
||||
stateObject.nonce = self.nonce
|
||||
stateObject.trie = self.trie
|
||||
stateObject.code = common.CopyBytes(self.code)
|
||||
stateObject.code = self.code
|
||||
stateObject.storage = self.storage.Copy()
|
||||
stateObject.remove = self.remove
|
||||
stateObject.dirty = self.dirty
|
||||
|
Loading…
Reference in New Issue
Block a user