From d173f0749c24564da0ff798f7f68810c088a39e3 Mon Sep 17 00:00:00 2001 From: William Banfield <4561443+williambanfield@users.noreply.github.com> Date: Fri, 6 May 2022 17:20:34 -0400 Subject: [PATCH] Update internal/consensus/metrics.go Co-authored-by: M. J. Fromberger --- internal/consensus/metrics.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/consensus/metrics.go b/internal/consensus/metrics.go index 7c69c5d5e..51f59cb8e 100644 --- a/internal/consensus/metrics.go +++ b/internal/consensus/metrics.go @@ -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) }