prysmaticlabs / prysm

Function with cyclomatic complexity higher than threshold GO-R1005
Anti-pattern
Minor
1 occurrence in this check
func ProcessSlots has a cyclomatic complexity of 32 with "very-high" risk
185//	      if (state.slot + 1) % SLOTS_PER_EPOCH == 0:
186//	          process_epoch(state)
187//	      state.slot = Slot(state.slot + 1)
188func ProcessSlots(ctx context.Context, state state.BeaconState, slot primitives.Slot) (state.BeaconState, error) {189	ctx, span := trace.StartSpan(ctx, "core.state.ProcessSlots")
190	defer span.End()
191	if state == nil || state.IsNil() {