mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-10 16:08:26 -05:00
multiple validator status - optimization (#12487)
* adding optmization * addressing comments * adding a test and fixing change in assignments.go * making some changes based on review of the code * removing irrelevant test * changing formatting
This commit is contained in:
@@ -121,7 +121,8 @@ func (c *beaconApiValidatorClient) getValidatorsStatusResponse(ctx context.Conte
|
||||
case ethpb.ValidatorStatus_PENDING, ethpb.ValidatorStatus_PARTIALLY_DEPOSITED, ethpb.ValidatorStatus_DEPOSITED:
|
||||
if !isLastActivatedValidatorIndexRetrieved {
|
||||
isLastActivatedValidatorIndexRetrieved = true
|
||||
|
||||
// TODO: double check this due to potential of PENDING STATE being active..
|
||||
// edge case https://github.com/prysmaticlabs/prysm/blob/0669050ffabe925c3d6e5e5d535a86361ae8522b/validator/client/validator.go#L1068
|
||||
activeStateValidators, err := c.stateValidatorsProvider.GetStateValidators(ctx, nil, nil, []string{"active"})
|
||||
if err != nil {
|
||||
return nil, nil, nil, errors.Wrap(err, "failed to get state validators")
|
||||
|
||||
Reference in New Issue
Block a user