Explorar o código

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.
gary rong %!s(int64=6) %!d(string=hai) anos
pai
achega
05347b3d98
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      core/state/state_object.go

+ 1 - 0
core/state/state_object.go

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