prysmaticlabs / prysm

Function with cyclomatic complexity higher than threshold GO-R1005
Anti-pattern
Minor
4 occurrences in this check
func UnmarshalJSON has a cyclomatic complexity of 27 with "very-high" risk
772	})
773}
774
775func (e *ExecutionPayloadDenebWithValueAndBlobsBundle) UnmarshalJSON(enc []byte) error {776	dec := GetPayloadV3ResponseJson{}
777	if err := json.Unmarshal(enc, &dec); err != nil {
778		return err
func UnmarshalJSON has a cyclomatic complexity of 22 with "high" risk
442}
443
444// UnmarshalJSON --
445func (e *ExecutionPayloadCapellaWithValue) UnmarshalJSON(enc []byte) error {446	dec := GetPayloadV2ResponseJson{}
447	if err := json.Unmarshal(enc, &dec); err != nil {
448		return err
func UnmarshalJSON has a cyclomatic complexity of 17 with "high" risk
370}
371
372// UnmarshalJSON --
373func (e *ExecutionPayload) UnmarshalJSON(enc []byte) error {374	dec := executionPayloadJSON{}
375	if err := json.Unmarshal(enc, &dec); err != nil {
376		return err
func UnmarshalJSON has a cyclomatic complexity of 27 with "very-high" risk
 56	return json.Marshal(decoded)
 57}
 58
 59func (e *ExecutionBlock) UnmarshalJSON(enc []byte) error { 60	type transactionsJson struct {
 61		Transactions []*gethtypes.Transaction `json:"transactions"`
 62	}