aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgary rong <garyrong0905@gmail.com>2019-09-20 17:55:44 +0800
committerFelix Lange <fjl@twurst.com>2019-09-20 17:55:44 +0800
commit05347b3d982504e383cfb72fbfc341bd2fe75e94 (patch)
treea04dc10c5e37a5f5ef403c4470a34633c6da75ed
parent24ef83518c5e3c173784b20eabba140162d66dfb (diff)
downloadgo-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.go1
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