erigon-pulse/erigon-lib/gointerfaces/remote/sort.go

15 lines
266 B
Go
Raw Permalink Normal View History

package remote
import (
"strings"
2022-07-26 02:42:34 +00:00
"github.com/ledgerwatch/erigon-lib/gointerfaces/types"
)
func NodeInfoReplyCmp(i, j *types.NodeInfoReply) int {
2022-07-26 02:42:34 +00:00
if cmp := strings.Compare(i.Name, j.Name); cmp != 0 {
return cmp
}
return strings.Compare(i.Enode, j.Enode)
}