Skip to content

Commit

Permalink
added debug loggin on malformed share case handling
Browse files Browse the repository at this point in the history
  • Loading branch information
AKorpusenko committed Feb 14, 2024
1 parent 94493ac commit 02f7287
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions eth/eventhandler/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,15 @@ func (eh *EventHandler) handleValidatorAdded(txn basedb.Txn, event *contract.Con
}

isOperatorShare := validatorShare.BelongsToOperator(eh.operatorData.GetOperatorData().ID)
if isOperatorShare && !validatorShare.InvalidSecret {
if isOperatorShare {
eh.metrics.ValidatorInactive(event.PublicKey)
ownShare = validatorShare
logger = logger.With(zap.Bool("own_validator", isOperatorShare))
if validatorShare.InvalidSecret {
logger = logger.With(zap.Bool("invalid_secret", true))
logger.Debug("registered validator has an invalid share secret, it will not be started")
} else {
ownShare = validatorShare
}
}

logger.Debug("processed event")
Expand Down

0 comments on commit 02f7287

Please sign in to comment.