Skip to content

Commit 5153d7f

Browse files
committed
eth/tracers: use Address.Less
1 parent 224fdb8 commit 5153d7f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

eth/tracers/api_test.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
package tracers
1818

1919
import (
20-
"bytes"
2120
"context"
2221
"crypto/ecdsa"
2322
"encoding/json"
@@ -791,9 +790,7 @@ func newAccounts(n int) (accounts []Account) {
791790
addr := crypto.PubkeyToAddress(key.PublicKey)
792791
accounts = append(accounts, Account{key: key, addr: addr})
793792
}
794-
slices.SortFunc(accounts, func(a, b Account) bool {
795-
return bytes.Compare(a.addr.Bytes(), b.addr.Bytes()) < 0
796-
})
793+
slices.SortFunc(accounts, func(a, b Account) bool { return a.addr.Less(b.addr) })
797794
return accounts
798795
}
799796

0 commit comments

Comments
 (0)