diff --git a/telegram.go b/telegram.go index 1702c94..e4722a0 100644 --- a/telegram.go +++ b/telegram.go @@ -321,13 +321,13 @@ func (r *TelegramReporter) getValidatorsStatus(message *tb.Message, getOnlyMissi r.Logger.Error(). Err(err). Msg("Could not get validator missed block group") - return !s.Jailed + return s.Active } - return !s.Jailed && group.Start != 0 + return s.Active && group.Start != 0 } - return !s.Jailed + return s.Active }) stateArray := MapToSlice(state) diff --git a/types.go b/types.go index fcd171e..3c3f4df 100644 --- a/types.go +++ b/types.go @@ -35,6 +35,7 @@ type ValidatorState struct { ConsensusAddress string MissedBlocks int64 Jailed bool + Active bool Tombstoned bool } @@ -48,6 +49,7 @@ func NewValidatorState( ConsensusAddress: info.Address, MissedBlocks: info.MissedBlocksCounter, Jailed: validator.Jailed, + Active: validator.Status == 3, // BOND_STATUS_BONDED Tombstoned: info.Tombstoned, } }