prysmaticlabs / prysm

Function with cyclomatic complexity higher than threshold GO-R1005
Anti-pattern
Minor
2 occurrences in this check
func performRoles has a cyclomatic complexity of 16 with "high" risk
230	return headSlot, nil
231}
232
233func performRoles(slotCtx context.Context, allRoles map[[48]byte][]iface.ValidatorRole, v iface.Validator, slot primitives.Slot, span *trace.Span) {234	attesterPubkeys := make([][fieldparams.BLSPubkeyLength]byte, 0, len(allRoles))
235	attData := make([]*ethpb.AttestationData, 0, len(allRoles))
236	wg := sync.WaitGroup{}
func SubmitAttestations has a cyclomatic complexity of 22 with "high" risk
 88// SubmitAttestations submits attestations for one slot to the beacon node.
 89// If there is an issue while preparing an attestation from the provided attestation data,
 90// then the attestation is ignored.
 91func (v *validator) SubmitAttestations( 92	ctx context.Context,
 93	slot primitives.Slot,
 94	pubkeys [][fieldparams.BLSPubkeyLength]byte,