From 078a5ecb7d51f42f67d7ecf2450306e1ae661e72 Mon Sep 17 00:00:00 2001 From: cui Date: Sun, 26 Oct 2025 16:13:59 +0800 Subject: [PATCH] core/state: improve accessList copy (#33024) --- core/state/access_list.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/state/access_list.go b/core/state/access_list.go index e3f1738864..0b830e7222 100644 --- a/core/state/access_list.go +++ b/core/state/access_list.go @@ -61,9 +61,10 @@ func newAccessList() *accessList { // Copy creates an independent copy of an accessList. func (al *accessList) Copy() *accessList { - cp := newAccessList() - cp.addresses = maps.Clone(al.addresses) - cp.slots = make([]map[common.Hash]struct{}, len(al.slots)) + cp := &accessList{ + addresses: maps.Clone(al.addresses), + slots: make([]map[common.Hash]struct{}, len(al.slots)), + } for i, slotMap := range al.slots { cp.slots[i] = maps.Clone(slotMap) }