prysmaticlabs / prysm

Unused code SCC-U1000
Bug risk
Major
4 occurrences in this check
func sortableIndices.Less is unused
 27func (s sortableIndices) Swap(i, j int) { s.indices[i], s.indices[j] = s.indices[j], s.indices[i] }
 28
 29// Less reports whether the element with index i must sort before the element with index j.
 30func (s sortableIndices) Less(i, j int) bool { 31	if s.validators[s.indices[i]].ActivationEligibilityEpoch == s.validators[s.indices[j]].ActivationEligibilityEpoch {
 32		return s.indices[i] < s.indices[j]
 33	}
func sortableIndices.Swap is unused
 24func (s sortableIndices) Len() int { return len(s.indices) }
 25
 26// Swap swaps the elements with indexes i and j.
 27func (s sortableIndices) Swap(i, j int) { s.indices[i], s.indices[j] = s.indices[j], s.indices[i] } 28
 29// Less reports whether the element with index i must sort before the element with index j.
 30func (s sortableIndices) Less(i, j int) bool {
func sortableIndices.Len is unused
 21}
 22
 23// Len is the number of elements in the collection.
 24func (s sortableIndices) Len() int { return len(s.indices) } 25
 26// Swap swaps the elements with indexes i and j.
 27func (s sortableIndices) Swap(i, j int) { s.indices[i], s.indices[j] = s.indices[j], s.indices[i] }
 15
 16// sortableIndices implements the Sort interface to sort newly activated validator indices
 17// by activation epoch and by index number.
 18type sortableIndices struct { 19	indices    []primitives.ValidatorIndex
 20	validators []*ethpb.Validator
 21}