mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
XDPoS/utils: use common.Address.Cmp for slices.SortFunc (#1704)
This commit is contained in:
parent
d5a03ab9e9
commit
47952ac264
1 changed files with 2 additions and 6 deletions
|
|
@ -66,12 +66,8 @@ func CompareSignersLists(list1 []common.Address, list2 []common.Address) bool {
|
|||
l1 := slices.Clone(list1)
|
||||
l2 := slices.Clone(list2)
|
||||
|
||||
slices.SortFunc(l1, func(a, b common.Address) int {
|
||||
return bytes.Compare(a[:], b[:])
|
||||
})
|
||||
slices.SortFunc(l2, func(a, b common.Address) int {
|
||||
return bytes.Compare(a[:], b[:])
|
||||
})
|
||||
slices.SortFunc(l1, common.Address.Cmp)
|
||||
slices.SortFunc(l2, common.Address.Cmp)
|
||||
|
||||
return slices.Equal(l1, l2)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue