Skip to content

Commit

Permalink
use float division, not integer
Browse files Browse the repository at this point in the history
Co-authored-by: Geoff Stuart <[email protected]>
Signed-off-by: F. Eugene Aumson <[email protected]>
  • Loading branch information
feuGeneA and geoff-vball committed Aug 21, 2024
1 parent 22eabca commit f964b69
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions signature-aggregator/aggregator/aggregator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit f964b69

Please sign in to comment.