Skip to content

Commit

Permalink
chore: alert if validator is jailed
Browse files Browse the repository at this point in the history
  • Loading branch information
albttx committed Dec 12, 2022
1 parent 45c5acb commit 224f930
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/cosmos-notifyer/cli_start.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,13 @@ func (s *service) blockHandler(ctx context.Context, c *cosmosblocks.Client, chai
return errors.Errorf("failed to get validator: %s", chain.ValidatorAddr)
}

if validator.Validator.IsJailed() {
s.notify.Alert(notifyer.AlertMsg{
Msg: fmt.Sprintf("[%s] %s is jailed",
chain.Name, validator.Validator.GetMoniker()),
})
}

validatorAddr, err := validator.GetAddress()
if err != nil {
return errors.Errorf("failed to parse validator address: %s", chain.ValidatorAddr)
Expand Down

0 comments on commit 224f930

Please sign in to comment.