Update internal/consensus/metrics.go

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
This commit is contained in:
William Banfield
2022-05-06 17:20:34 -04:00
committed by GitHub
co-authored by M. J. Fromberger
parent ca143325eb
commit d173f0749c
+2 -2
View File
@@ -410,8 +410,8 @@ func (m *Metrics) MarkVoteExtensionReceived(appValid bool) {
m.VoteExtensionReceiveCount.With("status", status).Add(1)
}
func (m *Metrics) MarkVoteReceived(vt tmproto.SignedMsgType, vp, tvp int64) {
p := float64(vp) / float64(tvp)
func (m *Metrics) MarkVoteReceived(vt tmproto.SignedMsgType, power, totalPower int64) {
p := float64(power) / float64(totalPower)
n := strings.ToLower(strings.TrimPrefix(vt.String(), "SIGNED_MSG_TYPE_"))
m.RoundVotingPowerPercent.With("vote_type", n).Add(p)
}