better comment (#3990)

This commit is contained in:
Raul Jordan 2019-11-13 09:37:23 -06:00 committed by Nishant Das
parent 75521fffbd
commit 48f69c0762

View File

@ -11,6 +11,8 @@ import (
// ComputeValidatorParticipation by matching validator attestations from the previous epoch, // ComputeValidatorParticipation by matching validator attestations from the previous epoch,
// computing the attesting balance, and how much attested compared to the total balance. // computing the attesting balance, and how much attested compared to the total balance.
// The previous epoch is used because it is deterministic, as the current epoch may not
// have completed yet and will not give accurate results.
func ComputeValidatorParticipation(state *pb.BeaconState, epoch uint64) (*ethpb.ValidatorParticipation, error) { func ComputeValidatorParticipation(state *pb.BeaconState, epoch uint64) (*ethpb.ValidatorParticipation, error) {
currentEpoch := helpers.CurrentEpoch(state) currentEpoch := helpers.CurrentEpoch(state)
previousEpoch := helpers.PrevEpoch(state) previousEpoch := helpers.PrevEpoch(state)