moonbeam-foundation / moonbeam

An Ethereum-compatible smart contract parachain on Polkadot
https://moonbeam.network
GNU General Public License v3.0
920 stars 333 forks source link

Fix staking smoke test round error #2823

Closed crystalin closed 4 months ago

crystalin commented 4 months ago

I also removed the withinTolerance which we should avoid, as it also make those tiny error propagate (silently) to other computations that can make bigger errors.

In this particular case, the percentage computation was done manually instead of using the Perbill function designed for it

github-actions[bot] commented 4 months ago

Coverage Report

@@                       Coverage Diff                        @@
##           master   crystalin-smoke-staking-round     +/-   ##
================================================================
  Coverage   72.88%                          72.88%   0.00%     
  Files         229                             229             
  Lines       70024                           70024             
================================================================
  Hits        51031                           51031             
  Misses      18993                           18993             
Files Changed Coverage

Coverage generated Wed May 29 14:20:33 UTC 2024