Meridian-IE / impact-evaluator

Impact Evaluator smart contract
Other
4 stars 0 forks source link

setScores: remove `moreScoresExpected` argument #37

Closed juliangruber closed 1 year ago

juliangruber commented 1 year ago

Before:

[PASS] test_SetScores() (gas: 1590817)
[PASS] test_SetScoresEmptyRound() (gas: 1556720)
[PASS] test_SetScoresFractions() (gas: 1638722)
[PASS] test_SetScoresMultipleCalls() (gas: 2025617)
[PASS] test_SetScoresMultipleParticipants() (gas: 1672702)
[PASS] test_SetScoresNotEvaluator() (gas: 1524221)
[PASS] test_SetScoresTooBig() (gas: 1595467)
[PASS] test_SetScoresUnfinishedRound() (gas: 1522351)

After:

[PASS] test_SetScores() (gas: 1538608)
[PASS] test_SetScoresEmptyRound() (gas: 1533288)
[PASS] test_SetScoresFractions() (gas: 1590435)
[PASS] test_SetScoresMultipleCalls() (gas: 1996595)
[PASS] test_SetScoresMultipleParticipants() (gas: 1628208)
[PASS] test_SetScoresNotEvaluator() (gas: 1465824)
[PASS] test_SetScoresTooBig() (gas: 1624697)
[PASS] test_SetScoresUnfinishedRound() (gas: 1463951)

This actually reduces gas :) Great idea, @bajtos!

juliangruber commented 1 year ago

hindsight please