فهرست منبع

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 سال پیش
والد
کامیت
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