Unify validator status response in RPC (#10128)

This commit is contained in:
Radosław Kapka 2022-01-26 20:23:53 +01:00 committed by GitHub
parent 943dec525c
commit 72817a6d0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -491,6 +491,9 @@ func (is *infostream) calculateStatusAndTransition(validator state.ReadOnlyValid
}
if currentEpoch < validator.ActivationEligibilityEpoch() {
if validator.EffectiveBalance() == 0 {
return ethpb.ValidatorStatus_PENDING, 0
}
if helpers.IsEligibleForActivationQueueUsingTrie(validator) {
return ethpb.ValidatorStatus_DEPOSITED, is.epochToTimestamp(validator.ActivationEligibilityEpoch())
}