Skip to content

Commit

Permalink
CNS-1008: fix small test
Browse files Browse the repository at this point in the history
  • Loading branch information
oren-lava committed Dec 5, 2024
1 parent 8fe023d commit a0080ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x/pairing/types/qos_report_refactor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ func TestQosCompute(t *testing.T) {
qos := types.QualityOfServiceReport{Latency: sdk.OneDec(), Sync: sdk.OneDec(), Availability: sdk.OneDec()}

// with the given QoS report and the default config, the expected score results:
// normal: score = latency + sync*syncFactor + ((1/availability) - 1) * FailureCost = 1 + 1*0.1 + (1/1 - 1) * 3 = 1.1
// normal: score = latency + sync*syncFactor + ((1/availability) - 1) * FailureCost = 1 + 1*0.3 + (1/1 - 1) * 3 = 1.3
// with block error probability: score = latency + blockErrorProbability * FailureCost + ((1/availability) - 1) * FailureCost = 1 + 1*3 + (1/1 - 1) * 3 = 4
expectedScoreDefault := sdk.NewDecWithPrec(11, 1)
expectedScoreDefault := sdk.NewDecWithPrec(13, 1)
expectedScoreBlockErrorProbability := sdk.NewDec(4)

template := []struct {
Expand Down

0 comments on commit a0080ba

Please sign in to comment.