Fix comments (#8802)

* fix incorrect exported name in comments

* add comments to exported methods
This commit is contained in:
Victor Farazdagi
2021-04-23 15:06:05 +03:00
committed by GitHub
parent 648e360842
commit 386b69f473
77 changed files with 178 additions and 27 deletions

View File

@@ -28,8 +28,13 @@ type sortableIndices struct {
validators []*ethpb.Validator
}
func (s sortableIndices) Len() int { return len(s.indices) }
// Len is the number of elements in the collection.
func (s sortableIndices) Len() int { return len(s.indices) }
// Swap swaps the elements with indexes i and j.
func (s sortableIndices) Swap(i, j int) { s.indices[i], s.indices[j] = s.indices[j], s.indices[i] }
// Less reports whether the element with index i must sort before the element with index j.
func (s sortableIndices) Less(i, j int) bool {
if s.validators[s.indices[i]].ActivationEligibilityEpoch == s.validators[s.indices[j]].ActivationEligibilityEpoch {
return s.indices[i] < s.indices[j]