relab / hotstuff

MIT License
172 stars 53 forks source link

modules/registry: use generics to constrain types #60

Closed johningve closed 2 years ago

johningve commented 2 years ago

We can use generics to constrain the types of module constructors and pointers at compile time to avoid having to check them at runtime.

codecov-commenter commented 2 years ago

Codecov Report

Merging #60 (939909f) into master (ce18e82) will increase coverage by 0.00%. The diff coverage is 66.66%.

@@           Coverage Diff           @@
##           master      #60   +/-   ##
=======================================
  Coverage   53.08%   53.08%           
=======================================
  Files          70       70           
  Lines        6403     6395    -8     
=======================================
- Hits         3399     3395    -4     
+ Misses       2724     2722    -2     
+ Partials      280      278    -2     
Flag Coverage Δ
unittests 53.08% <66.66%> (+<0.01%) :arrow_up:

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

Impacted Files Coverage Δ
modules/registry.go 48.21% <66.66%> (-0.23%) :arrow_down:
blockchain/blockchain.go 83.67% <0.00%> (-7.15%) :arrow_down:
consensus/chainedhotstuff/chainedhotstuff.go 83.92% <0.00%> (-5.36%) :arrow_down:
consensus/consensus.go 61.07% <0.00%> (-2.40%) :arrow_down:
synchronizer/synchronizer.go 81.46% <0.00%> (-1.73%) :arrow_down:
twins/network.go 84.21% <0.00%> (-1.58%) :arrow_down:
crypto/cache.go 65.62% <0.00%> (-1.57%) :arrow_down:
crypto/ecdsa/ecdsa.go 61.97% <0.00%> (+2.08%) :arrow_up:
crypto/base.go 79.34% <0.00%> (+3.26%) :arrow_up:
consensus/votingmachine.go 81.81% <0.00%> (+20.77%) :arrow_up:

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 ce18e82...939909f. Read the comment docs.