mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-16 01:40:44 +00:00
Co-authored-by: cui <523516579@qq.com> Co-authored-by: Felix Lange <fjl@twurst.com>
This commit is contained in:
parent
604ba0ea14
commit
bcf007335a
1 changed files with 3 additions and 9 deletions
|
|
@ -17,6 +17,8 @@
|
||||||
package logger
|
package logger
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"maps"
|
||||||
|
|
||||||
"github.com/XinFinOrg/XDPoSChain/common"
|
"github.com/XinFinOrg/XDPoSChain/common"
|
||||||
"github.com/XinFinOrg/XDPoSChain/core/tracing"
|
"github.com/XinFinOrg/XDPoSChain/core/tracing"
|
||||||
"github.com/XinFinOrg/XDPoSChain/core/types"
|
"github.com/XinFinOrg/XDPoSChain/core/types"
|
||||||
|
|
@ -71,17 +73,9 @@ func (al accessList) equal(other accessList) bool {
|
||||||
// Accounts match, cross reference the storage slots too
|
// Accounts match, cross reference the storage slots too
|
||||||
for addr, slots := range al {
|
for addr, slots := range al {
|
||||||
otherslots := other[addr]
|
otherslots := other[addr]
|
||||||
|
if !maps.Equal(slots, otherslots) {
|
||||||
if len(slots) != len(otherslots) {
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
// Given that len(slots) == len(otherslots), we only need to check that
|
|
||||||
// all the items from slots are in otherslots.
|
|
||||||
for hash := range slots {
|
|
||||||
if _, ok := otherslots[hash]; !ok {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue