Skip to content

Commit 05347b3

Browse files
rjl493456442fjl
authored andcommitted
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.
1 parent 24ef835 commit 05347b3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/state/state_object.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ func (s *stateObject) deepCopy(db *StateDB) *stateObject {
379379
stateObject.code = s.code
380380
stateObject.dirtyStorage = s.dirtyStorage.Copy()
381381
stateObject.originStorage = s.originStorage.Copy()
382+
stateObject.pendingStorage = s.pendingStorage.Copy()
382383
stateObject.suicided = s.suicided
383384
stateObject.dirtyCode = s.dirtyCode
384385
stateObject.deleted = s.deleted

0 commit comments

Comments
 (0)