core/state: fix state object deep copy (#20100)

deepCopy didn't copy pending storage updates, leading to the
creation of blocks with invalid state root.
This commit is contained in:
gary rong 2019-09-20 17:55:44 +08:00 committed by Felix Lange
parent 24ef83518c
commit 05347b3d98

@ -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