Skip to content

Commit

Permalink
eth/tracers: use Address.Less
Browse files Browse the repository at this point in the history
  • Loading branch information
fjl committed Jun 19, 2023
1 parent 224fdb8 commit 5153d7f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions eth/tracers/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package tracers

import (
"bytes"
"context"
"crypto/ecdsa"
"encoding/json"
Expand Down Expand Up @@ -791,9 +790,7 @@ func newAccounts(n int) (accounts []Account) {
addr := crypto.PubkeyToAddress(key.PublicKey)
accounts = append(accounts, Account{key: key, addr: addr})
}
slices.SortFunc(accounts, func(a, b Account) bool {
return bytes.Compare(a.addr.Bytes(), b.addr.Bytes()) < 0
})
slices.SortFunc(accounts, func(a, b Account) bool { return a.addr.Less(b.addr) })
return accounts
}

Expand Down

0 comments on commit 5153d7f

Please sign in to comment.