Don't run the test 50 times

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
Jakub Sztandera 2020-08-13 14:00:55 +02:00
parent 09f5a64ce0
commit 0daed04c07
No known key found for this signature in database
GPG Key ID: 9A9AF56F8B3879BA

View File

@ -926,7 +926,8 @@ func testCompetitiveMessageSelection(t *testing.T, rng *rand.Rand) (float64, flo
capacityBoost := 0.0
rewardBoost := 0.0
for i := 0; i < 50; i++ {
const runs = 1
for i := 0; i < runs; i++ {
// 2. optimal selection
minersRand := rng.Float64()
winerProba := noWinnersProb()
@ -982,8 +983,8 @@ func testCompetitiveMessageSelection(t *testing.T, rng *rand.Rand) (float64, flo
}
capacityBoost /= 50
rewardBoost /= 50
capacityBoost /= runs
rewardBoost /= runs
t.Logf("Average capacity boost: %f", capacityBoost)
t.Logf("Average reward boost: %f", rewardBoost)