mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
parent
9287ad4089
commit
b8feb5cffc
1 changed files with 4 additions and 3 deletions
|
|
@ -58,9 +58,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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue