Skip to content

Commit

Permalink
dont copy trie in lightCopy
Browse files Browse the repository at this point in the history
  • Loading branch information
sunny2022da committed Oct 15, 2024
1 parent 7148619 commit 0a76ec7
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions core/state/state_object.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0a76ec7

Please sign in to comment.