erigon-pulse/erigon-lib/gointerfaces/remote/sort.go
battlmonstr 231e468e19 Add 'erigon-lib/' from commit '93d9c9d9fe4bd8a49f7a98a6bce0f0da7094c7d3'
git-subtree-dir: erigon-lib
git-subtree-mainline: 3c8cbda809
git-subtree-split: 93d9c9d9fe
2023-09-20 14:50:25 +02:00

15 lines
280 B
Go

package remote
import (
"strings"
"github.com/ledgerwatch/erigon-lib/gointerfaces/types"
)
func NodeInfoReplyLess(i, j *types.NodeInfoReply) bool {
if cmp := strings.Compare(i.Name, j.Name); cmp != 0 {
return cmp == -1
}
return strings.Compare(i.Enode, j.Enode) == -1
}