function 'GetLiveness' seems to be a getter but it does not return any result
989// It is important to note that the values returned by the beacon node are not canonical;
990// they are best-effort and based upon a subjective view of the network.
991// A beacon node that was recently started or suffered a network partition may indicate that a validator is not live when it actually is.
992func (s *Server) GetLiveness(w http.ResponseWriter, r *http.Request) { 993 ctx, span := trace.StartSpan(r.Context(), "validator.GetLiveness")
994 defer span.End()
995
function 'GetSyncCommitteeDuties' seems to be a getter but it does not return any result
856// or an epoch from the next sync committee period, then get the current state.
857// - Get the state's current sync committee. If it's an epoch from the next sync committee period, then get the next sync committee.
858// - Get duties.
859func (s *Server) GetSyncCommitteeDuties(w http.ResponseWriter, r *http.Request) { 860 ctx, span := trace.StartSpan(r.Context(), "validator.GetSyncCommitteeDuties")
861 defer span.End()
862
function 'GetProposerDuties' seems to be a getter but it does not return any result
729}
730
731// GetProposerDuties requests beacon node to provide all validators that are scheduled to propose a block in the given epoch.
732func (s *Server) GetProposerDuties(w http.ResponseWriter, r *http.Request) { 733 ctx, span := trace.StartSpan(r.Context(), "validator.GetProposerDuties")
734 defer span.End()
735
function 'GetAttesterDuties' seems to be a getter but it does not return any result
600
601// GetAttesterDuties requests the beacon node to provide a set of attestation duties,
602// which should be performed by validators, for a particular epoch.
603func (s *Server) GetAttesterDuties(w http.ResponseWriter, r *http.Request) { 604 ctx, span := trace.StartSpan(r.Context(), "validator.GetAttesterDuties")
605 defer span.End()
606
function 'GetAttestationData' seems to be a getter but it does not return any result
395
396// GetAttestationData requests that the beacon node produces attestation data for
397// the requested committee index and slot based on the nodes current head.
398func (s *Server) GetAttestationData(w http.ResponseWriter, r *http.Request) { 399 ctx, span := trace.StartSpan(r.Context(), "validator.GetAttestationData")
400 defer span.End()
401
function 'GetAggregateAttestation' seems to be a getter but it does not return any result
38)
39
40// GetAggregateAttestation aggregates all attestations matching the given attestation data root and slot, returning the aggregated result.
41func (s *Server) GetAggregateAttestation(w http.ResponseWriter, r *http.Request) { 42 _, span := trace.StartSpan(r.Context(), "validator.GetAggregateAttestation")
43 defer span.End()
44
Description
Typically, functions with names prefixed with Get are supposed to return a value.
Bad practice
func GetData(n int) {
fmt.Println(10 - n)
}
Recommended
func GetData(n int) int {
fmt.Println(10 - n)
return 10 - n
}