Skip to content
This repository has been archived by the owner on Oct 18, 2023. It is now read-only.

Commit

Permalink
fix sort func (ledgerwatch#4828)
Browse files Browse the repository at this point in the history
  • Loading branch information
AskAlexSharov committed Jul 26, 2022
1 parent 790af5a commit 5ee60db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions eth/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ import (
"math/big"
"os"
"path/filepath"
"sort"
"strconv"
"sync"
"time"

"github.com/ledgerwatch/erigon/eth/ethconsensusconfig"
"github.com/ledgerwatch/erigon/turbo/engineapi"
"github.com/ledgerwatch/erigon/turbo/services"
"golang.org/x/exp/slices"
"google.golang.org/protobuf/types/known/emptypb"

"github.com/holiman/uint256"
Expand Down Expand Up @@ -780,7 +780,7 @@ func (s *Ethereum) NodesInfo(limit int) (*remote.NodesInfoReply, error) {
}

nodesInfo := &remote.NodesInfoReply{NodesInfo: nodes}
sort.Sort(nodesInfo)
slices.SortFunc(nodesInfo.NodesInfo, remote.NodeInfoReplyLess)

return nodesInfo, nil
}
Expand Down

0 comments on commit 5ee60db

Please sign in to comment.