Unused method receiver '_', consider removing it
54 return slice.SetUint64(commIds)
55}
56
57func (_ *Service) attesterSubnetIndices(currentSlot primitives.Slot) []uint64 {58 endEpoch := slots.ToEpoch(currentSlot) + 1
59 endSlot := params.BeaconConfig().SlotsPerEpoch.Mul(uint64(endEpoch))
60 var (
Unused method receiver '_', consider removing it
40 return cache.SubnetIDs.GetAllSubnets()
41}
42
43func (_ *Service) aggregatorSubnetIndices(currentSlot primitives.Slot) []uint64 {44 endEpoch := slots.ToEpoch(currentSlot) + 1
45 endSlot := params.BeaconConfig().SlotsPerEpoch.Mul(uint64(endEpoch))
46 var commIds []uint64
Unused method receiver '_', consider removing it
36 return s.cfg.attPool.SaveUnaggregatedAttestation(a)
37}
38
39func (_ *Service) persistentSubnetIndices() []uint64 {40 return cache.SubnetIDs.GetAllSubnets()
41}
42
Method receiver 's' is not referenced in method's body, consider removing it
1100
1101// SyncCommitteeSelections responds with appropriate message and status code according the spec:
1102// https://ethereum.github.io/beacon-APIs/#/Validator/submitSyncCommitteeSelections.
1103func (s *Server) SyncCommitteeSelections(w http.ResponseWriter, _ *http.Request) {1104 httputil.HandleError(w, "Endpoint not implemented", 501)
1105}
1106
Method receiver 's' is not referenced in method's body, consider removing it
1094
1095// BeaconCommitteeSelections responds with appropriate message and status code according the spec:
1096// https://ethereum.github.io/beacon-APIs/#/Validator/submitBeaconCommitteeSelections.
1097func (s *Server) BeaconCommitteeSelections(w http.ResponseWriter, _ *http.Request) {1098 httputil.HandleError(w, "Endpoint not implemented", 501)
1099}
1100
Description
Methods with unused receivers can be a symptom of unfinished refactoring or a bug. To keep the same method signature, omit the receiver name or '_' as it is unused.
Bad practice
func (f *Unix) Name() string {
return "unix"
}
func (_ *Unix) Name() string {
return "unix"
}
Recommended
func (*Unix) Name() string {
return "unix"
}