diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/state/beaconstate/common/ValidatorIndexCache.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/state/beaconstate/common/ValidatorIndexCache.java index dd0d5f7f125..98713f69066 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/state/beaconstate/common/ValidatorIndexCache.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/state/beaconstate/common/ValidatorIndexCache.java @@ -58,8 +58,8 @@ public Optional getValidatorIndex( if (validatorIndex.isPresent()) { return validatorIndex.filter(index -> index < validators.size()); } - // Making sure to use the same latestFinalizedIndex when scanning through - // the finalized and the non-finalized states + // Using the same latestFinalizedIndex when scanning through + // the finalized and the non-finalized states ensures consistency final int latestFinalizedIndexSnapshot = latestFinalizedIndex.get(); return findIndexFromFinalizedState(validators, publicKey, latestFinalizedIndexSnapshot) .or(