Skip to content

Commit

Permalink
include all statuses (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marketen authored Dec 13, 2024
1 parent 2ce0238 commit b26930b
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion internal/adapters/beaconchain/beaconchain_adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,20 @@ func (b *BeaconchainAdapter) GetSyncingStatus() (bool, error) {
}

func (b *BeaconchainAdapter) GetValidatorStatus(pubkey string) (domain.ValidatorStatus, error) {
validatorData, err := b.PostStateValidators("finalized", []string{pubkey}, []domain.ValidatorStatus{})

allStatuses := []domain.ValidatorStatus{
domain.StatusPendingInitialized,
domain.StatusPendingQueued,
domain.StatusActiveOngoing,
domain.StatusActiveExiting,
domain.StatusActiveSlashed,
domain.StatusExitedUnslashed,
domain.StatusExitedSlashed,
domain.StatusWithdrawalPossible,
domain.StatusWithdrawalDone,
}

validatorData, err := b.PostStateValidators("finalized", []string{pubkey}, allStatuses)
if err != nil {
return "", fmt.Errorf("failed to get validator data for pubkey %s: %w", pubkey, err)
}
Expand Down

0 comments on commit b26930b

Please sign in to comment.