diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/logic/common/helpers/BeaconStateAccessors.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/logic/common/helpers/BeaconStateAccessors.java index 34ed7512a10..0ea29f591a6 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/logic/common/helpers/BeaconStateAccessors.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/logic/common/helpers/BeaconStateAccessors.java @@ -58,21 +58,21 @@ public UInt64 getPreviousEpoch(BeaconState state) { return currentEpoch.equals(GENESIS_EPOCH) ? GENESIS_EPOCH : currentEpoch.minus(UInt64.ONE); } - public UInt64 getValidatorChurnLimit(BeaconState state) { + public UInt64 getValidatorChurnLimit(final BeaconState state) { final int activeValidatorCount = getActiveValidatorIndices(state, getCurrentEpoch(state)).size(); return getValidatorChurnLimit(activeValidatorCount); } - public UInt64 getValidatorActivationChurnLimit(BeaconState state) { - return getValidatorChurnLimit(state); - } - public UInt64 getValidatorChurnLimit(final int activeValidatorCount) { return UInt64.valueOf(config.getMinPerEpochChurnLimit()) .max(UInt64.valueOf(activeValidatorCount / config.getChurnLimitQuotient())); } + public UInt64 getValidatorActivationChurnLimit(final BeaconState state) { + return getValidatorChurnLimit(state); + } + public Optional getValidatorPubKey(BeaconState state, UInt64 validatorIndex) { if (state.getValidators().size() <= validatorIndex.longValue() || validatorIndex.longValue() < 0) {