Просмотр исходного кода

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 6 лет назад
Родитель
Сommit
05347b3d98
1 измененных файлов с 1 добавлено и 0 удалено
  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