From 05347b3d982504e383cfb72fbfc341bd2fe75e94 Mon Sep 17 00:00:00 2001 From: gary rong Date: Fri, 20 Sep 2019 17:55:44 +0800 Subject: [PATCH] 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. --- core/state/state_object.go | 1 + 1 file changed, 1 insertion(+) diff --git a/core/state/state_object.go b/core/state/state_object.go index f9d7559d8..8680de021 100644 --- a/core/state/state_object.go +++ b/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