From a4d50f097e927ef59706a55ed571a5746aca74a1 Mon Sep 17 00:00:00 2001 From: Nishant Das Date: Fri, 10 May 2019 21:43:04 +0800 Subject: [PATCH] Fix Logging in Validator Client (#2555) --- validator/client/validator.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/validator/client/validator.go b/validator/client/validator.go index b6ed9e979..bc09ed314 100644 --- a/validator/client/validator.go +++ b/validator/client/validator.go @@ -124,10 +124,17 @@ func (v *validator) checkAndLogValidatorStatus(validatorStatuses []*pb.Validator if status.Status.Status == pb.ValidatorStatus_ACTIVE { activatedKeys = append(activatedKeys, status.PublicKey) } + if status.Status.Status == pb.ValidatorStatus_EXITED { + log.WithFields(logrus.Fields{ + "publicKey": fmt.Sprintf("%#x", bytesutil.Trunc(status.PublicKey)), + "status": status.Status.Status.String(), + }).Info("Validator has been ejected") + continue + } if status.Status.DepositInclusionSlot == 0 { log.WithFields(logrus.Fields{ "publicKey": fmt.Sprintf("%#x", bytesutil.Trunc(status.PublicKey)), - "status": fmt.Sprintf("%s", status.Status.Status.String()), + "status": status.Status.Status.String(), }).Info("Not yet included in state...") continue }