Compare commits

...

1 Commits

Author SHA1 Message Date
William Banfield
1671f3290d consensus: check proposal non-nil in prevote message delay metric 2022-01-18 15:40:21 -05:00

View File

@@ -2399,11 +2399,16 @@ func (cs *State) checkDoubleSigningRisk(height int64) error {
}
func (cs *State) calculatePrevoteMessageDelayMetrics() {
if cs.Proposal == nil {
return
}
ps := cs.Votes.Prevotes(cs.Round)
pl := ps.List()
sort.Slice(pl, func(i, j int) bool {
return pl[i].Timestamp.Before(pl[j].Timestamp)
})
var votingPowerSeen int64
for _, v := range pl {
_, val := cs.Validators.GetByAddress(v.ValidatorAddress)