prysmaticlabs / prysm

Functions prefixed with Get should return a value RVV-A0006
Anti-pattern
Major
5 occurrences in this check
function 'GetForkChoice' seems to be a getter but it does not return any result
154}
155
156// GetForkChoice returns a dump fork choice store.
157func (s *Server) GetForkChoice(w http.ResponseWriter, r *http.Request) {158	ctx, span := trace.StartSpan(r.Context(), "debug.GetForkChoice")
159	defer span.End()
160
function 'GetForkChoiceHeadsV2' seems to be a getter but it does not return any result
129}
130
131// GetForkChoiceHeadsV2 retrieves the leaves of the current fork choice tree.
132func (s *Server) GetForkChoiceHeadsV2(w http.ResponseWriter, r *http.Request) {133	ctx, span := trace.StartSpan(r.Context(), "debug.GetForkChoiceHeadsV2")
134	defer span.End()
135
function 'getBeaconStateSSZV2' seems to be a getter but it does not return any result
113}
114
115// getBeaconStateSSZV2 returns the SSZ-serialized version of the full beacon state object for given state ID.
116func (s *Server) getBeaconStateSSZV2(ctx context.Context, w http.ResponseWriter, id []byte) {117	st, err := s.Stater.State(ctx, id)
118	if err != nil {
119		shared.WriteStateFetchError(w, err)
function 'getBeaconStateV2' seems to be a getter but it does not return any result
 38}
 39
 40// getBeaconStateV2 returns the JSON-serialized version of the full beacon state object for given state ID.
 41func (s *Server) getBeaconStateV2(ctx context.Context, w http.ResponseWriter, id []byte) { 42	st, err := s.Stater.State(ctx, id)
 43	if err != nil {
 44		shared.WriteStateFetchError(w, err)
function 'GetBeaconStateV2' seems to be a getter but it does not return any result
 20const errMsgStateFromConsensus = "Could not convert consensus state to response"
 21
 22// GetBeaconStateV2 returns the full beacon state for a given state ID.
 23func (s *Server) GetBeaconStateV2(w http.ResponseWriter, r *http.Request) { 24	ctx, span := trace.StartSpan(r.Context(), "debug.GetBeaconStateV2")
 25	defer span.End()
 26