bosagora / agora

POC Node implementation for CoinNet
https://bosagora.io
MIT License
37 stars 23 forks source link

EnrollmentManager: Merge setCommitment and setEnrollmentKey, remove test #3237

Closed Geod24 closed 2 years ago

Geod24 commented 2 years ago

The unittest was testing a simple setter/getter, and the likelihood of this ever getting broken was very low. It was also putting the EnrollmentManager in an inconsistent state. In order to prevent this inconsistent state, both set methods were merged, and the test was removed for its lack of actual usefulness.

codecov[bot] commented 2 years ago

Codecov Report

Merging #3237 (30ac7cf) into v0.x.x (22ad709) will increase coverage by 0.26%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           v0.x.x    #3237      +/-   ##
==========================================
+ Coverage   88.36%   88.63%   +0.26%     
==========================================
  Files         166      166              
  Lines       17065    17052      -13     
==========================================
+ Hits        15080    15114      +34     
+ Misses       1985     1938      -47     
Flag Coverage Δ
integration 41.86% <ø> (+7.51%) :arrow_up:
unittests 87.35% <100.00%> (-0.01%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
source/agora/consensus/EnrollmentManager.d 96.85% <100.00%> (-0.11%) :arrow_down:
source/agora/consensus/state/UTXOCache.d 75.00% <0.00%> (-2.09%) :arrow_down:
source/agora/node/Validator.d 91.95% <0.00%> (-1.01%) :arrow_down:
source/agora/consensus/state/Ledger.d 90.60% <0.00%> (-0.34%) :arrow_down:
source/agora/network/Manager.d 80.59% <0.00%> (ø)
source/agora/consensus/protocol/Nominator.d 90.95% <0.00%> (ø)
source/agora/node/FullNode.d 76.47% <0.00%> (+0.30%) :arrow_up:
source/agora/common/BanManager.d 87.39% <0.00%> (+0.84%) :arrow_up:
source/agora/consensus/state/ValidatorSet.d 86.77% <0.00%> (+1.05%) :arrow_up:
source/agora/node/Registry.d 79.95% <0.00%> (+2.34%) :arrow_up:
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 22ad709...30ac7cf. Read the comment docs.