prysmaticlabs / prysm

Confusing naming of struct fields or methods RVV-B0001
Bug risk
Minor
12 days ago3 years old
Method 'generateVoluntaryExits' differs only by capitalization to function 'GenerateVoluntaryExits' in the same source file
 377	return exit, nil
 378}
 379
 380func generateVoluntaryExits( 381	bState state.BeaconState,
 382	privs []bls.SecretKey,
 383	numExits uint64,
Method 'isEligibleForActivationQueue' differs only by capitalization to function 'IsEligibleForActivationQueue' in the same source file
422//	      validator.activation_eligibility_epoch == FAR_FUTURE_EPOCH
423//	      and validator.effective_balance == MAX_EFFECTIVE_BALANCE
424//	  )
425func isEligibleForActivationQueue(activationEligibilityEpoch primitives.Epoch, effectiveBalance uint64) bool {426	return activationEligibilityEpoch == params.BeaconConfig().FarFutureEpoch &&
427		effectiveBalance == params.BeaconConfig().MaxEffectiveBalance
428}
Method 'isEligibleForActivation' differs only by capitalization to function 'IsEligibleForActivation' in the same source file
474}
475
476// isEligibleForActivation carries out the logic for IsEligibleForActivation*
477func isEligibleForActivation(activationEligibilityEpoch, activationEpoch, finalizedEpoch primitives.Epoch) bool {478	return activationEligibilityEpoch <= finalizedEpoch &&
479		activationEpoch == params.BeaconConfig().FarFutureEpoch
480}
Method 'stateRootAtIndex' differs only by capitalization to method 'StateRootAtIndex' in the same source file
477// This assumes that a lock is already held on BeaconState.
478//
479// WARNING: This function does not work with the multi-value slice feature.
480func (b *BeaconState) stateRootAtIndex(idx uint64) ([32]byte, error) {481	if uint64(len(b.stateRoots)) <= idx {
482		return [32]byte{}, errors.Wrapf(consensus_types.ErrOutOfBounds, "state root index %d does not exist", idx)
483	}
Method 'balanceAtIndex' differs only by capitalization to method 'BalanceAtIndex' in the same source file
334	return b.balanceAtIndex(idx)
335}
336
337func (b *BeaconState) balanceAtIndex(idx primitives.ValidatorIndex) (uint64, error) {338	if features.Get().EnableExperimentalState {
339		if b.balancesMultiValue == nil {
340			return 0, nil