mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 21:07:18 +00:00
Fix current epoch committee count (#2099)
* fix current epoch committee count * prev epoch
This commit is contained in:
parent
839845645c
commit
761f3352a0
@ -77,12 +77,12 @@ func EpochCommitteeCount(activeValidatorCount uint64) uint64 {
|
||||
// """
|
||||
// current_active_validators = get_active_validator_indices(
|
||||
// state.validator_registry,
|
||||
// state.current_calculation_epoch,
|
||||
// get_current_epoch(state),
|
||||
// )
|
||||
// return get_epoch_committee_count(len(current_active_validators)
|
||||
func CurrentEpochCommitteeCount(state *pb.BeaconState) uint64 {
|
||||
currActiveValidatorIndices := ActiveValidatorIndices(
|
||||
state.ValidatorRegistry, state.CurrentShufflingEpoch)
|
||||
state.ValidatorRegistry, CurrentEpoch(state))
|
||||
return EpochCommitteeCount(uint64(len(currActiveValidatorIndices)))
|
||||
}
|
||||
|
||||
@ -96,12 +96,12 @@ func CurrentEpochCommitteeCount(state *pb.BeaconState) uint64 {
|
||||
// """
|
||||
// previous_active_validators = get_active_validator_indices(
|
||||
// state.validator_registry,
|
||||
// state.previous_calculation_epoch,
|
||||
// state.previous_epoch,
|
||||
// )
|
||||
// return get_epoch_committee_count(len(previous_active_validators))
|
||||
func PrevEpochCommitteeCount(state *pb.BeaconState) uint64 {
|
||||
prevActiveValidatorIndices := ActiveValidatorIndices(
|
||||
state.ValidatorRegistry, state.PreviousShufflingEpoch)
|
||||
state.ValidatorRegistry, PrevEpoch(state))
|
||||
return EpochCommitteeCount(uint64(len(prevActiveValidatorIndices)))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user