Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
core/state: fix state object deep copy (ethereum#20100)
Browse files Browse the repository at this point in the history
deepCopy didn't copy pending storage updates, leading to the
creation of blocks with invalid state root.
  • Loading branch information
rjl493456442 authored and elizabethengelman committed Dec 20, 2019
1 parent 86e8a36 commit 41258ce
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/state/state_object.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ func (s *stateObject) deepCopy(db *StateDB) *stateObject {
stateObject.code = s.code
stateObject.dirtyStorage = s.dirtyStorage.Copy()
stateObject.originStorage = s.originStorage.Copy()
stateObject.pendingStorage = s.pendingStorage.Copy()
stateObject.suicided = s.suicided
stateObject.dirtyCode = s.dirtyCode
stateObject.deleted = s.deleted
Expand Down

0 comments on commit 41258ce

Please sign in to comment.