mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-28 14:47:16 +00:00
da3c239ed6
* Add nodeInfo * Remove interfaces for replacement Signed-off-by: Dmitry Savelev <darksawa@gmail.com> * Squashed 'interfaces/' content from commit 67abfdd git-subtree-dir: interfaces git-subtree-split: 67abfdd23b3bbef0d2f0c038275b6f47820d7f5e
21 lines
440 B
Go
21 lines
440 B
Go
package remote
|
|
|
|
import (
|
|
"strings"
|
|
)
|
|
|
|
func (x *NodesInfoReply) Len() int {
|
|
return len(x.NodesInfo)
|
|
}
|
|
|
|
func (x *NodesInfoReply) Less(i, j int) bool {
|
|
if cmp := strings.Compare(x.NodesInfo[i].Name, x.NodesInfo[j].Name); cmp != 0 {
|
|
return cmp == -1
|
|
}
|
|
return strings.Compare(x.NodesInfo[i].Enode, x.NodesInfo[j].Enode) == -1
|
|
}
|
|
|
|
func (x *NodesInfoReply) Swap(i, j int) {
|
|
x.NodesInfo[i], x.NodesInfo[j] = x.NodesInfo[j], x.NodesInfo[i]
|
|
}
|