From f964b69b524a8f0a9b94dfcace62e3683f0b2dba Mon Sep 17 00:00:00 2001 From: "F. Eugene Aumson" Date: Wed, 21 Aug 2024 15:12:02 -0400 Subject: [PATCH] use float division, not integer Co-authored-by: Geoff Stuart Signed-off-by: F. Eugene Aumson --- signature-aggregator/aggregator/aggregator.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/signature-aggregator/aggregator/aggregator.go b/signature-aggregator/aggregator/aggregator.go index a0bdcf2f..0e6cf3df 100644 --- a/signature-aggregator/aggregator/aggregator.go +++ b/signature-aggregator/aggregator/aggregator.go @@ -124,10 +124,8 @@ func (s *SignatureAggregator) CreateSignedMessage( s.metrics.ConnectedStakeWeightPercentage.WithLabelValues( signingSubnet.String(), ).Set( - float64( - connectedValidators.ConnectedWeight / - connectedValidators.TotalValidatorWeight, - ), + float64(connectedValidators.ConnectedWeight) / + float64(connectedValidators.TotalValidatorWeight), ) if !utils.CheckStakeWeightPercentageExceedsThreshold(