diff options
author | gary rong <garyrong0905@gmail.com> | 2019-09-20 17:55:44 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2019-09-20 17:55:44 +0800 |
commit | 05347b3d982504e383cfb72fbfc341bd2fe75e94 (patch) | |
tree | a04dc10c5e37a5f5ef403c4470a34633c6da75ed | |
parent | 24ef83518c5e3c173784b20eabba140162d66dfb (diff) | |
download | go-tangerine-05347b3d982504e383cfb72fbfc341bd2fe75e94.tar.gz go-tangerine-05347b3d982504e383cfb72fbfc341bd2fe75e94.tar.zst go-tangerine-05347b3d982504e383cfb72fbfc341bd2fe75e94.zip |
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.
-rw-r--r-- | core/state/state_object.go | 1 |
1 files changed, 1 insertions, 0 deletions
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 |