From 0a76ec70ca8009fcdd45ad96a510592db7ee72c5 Mon Sep 17 00:00:00 2001 From: Sunny Date: Tue, 15 Oct 2024 21:08:44 +0800 Subject: [PATCH] dont copy trie in lightCopy --- core/state/state_object.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/core/state/state_object.go b/core/state/state_object.go index 5f6563949..b1b95db3c 100644 --- a/core/state/state_object.go +++ b/core/state/state_object.go @@ -760,11 +760,13 @@ func (s *stateObject) ReturnGas(gas *uint256.Int) {} func (s *stateObject) lightCopy(db *ParallelStateDB) *stateObject { object := newObject(db, s.isParallel, s.address, &s.data) - if s.trie != nil { - s.db.trieParallelLock.Lock() - object.trie = db.db.CopyTrie(s.trie) - s.db.trieParallelLock.Unlock() - } + /* + if s.trie != nil { + s.db.trieParallelLock.Lock() + object.trie = db.db.CopyTrie(s.trie) + s.db.trieParallelLock.Unlock() + } + */ object.code = s.code object.selfDestructed = s.selfDestructed // should be false object.dirtyCode = s.dirtyCode // it is not used in slot, but keep it is ok