Skip to content

Commit

Permalink
store metric as a percentage, not a ratio
Browse files Browse the repository at this point in the history
addresses review comment #434 (comment)
  • Loading branch information
feuGeneA committed Aug 22, 2024
1 parent f964b69 commit 503992a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion signature-aggregator/aggregator/aggregator.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func (s *SignatureAggregator) CreateSignedMessage(
signingSubnet.String(),
).Set(
float64(connectedValidators.ConnectedWeight) /
float64(connectedValidators.TotalValidatorWeight),
float64(connectedValidators.TotalValidatorWeight) * 100,
)

if !utils.CheckStakeWeightPercentageExceedsThreshold(
Expand Down
2 changes: 1 addition & 1 deletion tests/signature_aggregator_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func SignatureAggregatorAPI(network interfaces.LocalNetwork) {
subnetAInfo.SubnetID.String(),
),
"==",
1,
100,
},
} {
Expect(metricsSample[m.name]).Should(
Expand Down

0 comments on commit 503992a

Please sign in to comment.