MCPcopy Create free account
hub / github.com/ethstorage/es-node / sortBigIntSlice

Function sortBigIntSlice

cmd/es-node/utils.go:230–239  ·  view source on GitHub ↗
(slice []*big.Int)

Source from the content-addressed store, hash-verified

228}
229
230func sortBigIntSlice(slice []*big.Int) []int {
231 indices := make([]int, len(slice))
232 for i := range indices {
233 indices[i] = i
234 }
235 sort.Slice(indices, func(i, j int) bool {
236 return slice[indices[i]].Cmp(slice[indices[j]]) < 0
237 })
238 return indices
239}
240
241func readRequiredFlag(ctx *cli.Context, flag cli.StringFlag) string {
242 name := flag.GetName()

Callers 2

TestSortBigIntSliceFunction · 0.85
getShardListFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestSortBigIntSliceFunction · 0.68