Fix Logging in Validator Client (#2555)

This commit is contained in:
Nishant Das 2019-05-10 21:43:04 +08:00 committed by terence tsao
parent 9a82845c3c
commit a4d50f097e

View File

@ -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
}