Finschia / ostracon

Ostracon, a consensus algorithm, is forked from Tendermint Core. We have added VRF to Tendermint BFT. It adds randomness to PoS Validator elections and improves security.
Apache License 2.0
70 stars 28 forks source link

fix: remove duplicated initialization of rand #764

Closed ulbqb closed 3 months ago

ulbqb commented 3 months ago

Description

This PR removes duplicated initialization of rand.

Issue

https://github.com/Finschia/ostracon/blob/08c34d4f52caa73faacabcab092b6ad65a35e6c2/libs/rand/random.go#L29-L38

rand.init() is run twice on init().

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 66.54%. Comparing base (2aa7d4c) to head (c4c4864). Report is 4 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #764 +/- ## ========================================== - Coverage 66.54% 66.54% -0.01% ========================================== Files 285 285 Lines 37919 37918 -1 ========================================== - Hits 25232 25231 -1 + Misses 10883 10880 -3 - Partials 1804 1807 +3 ``` | [Files](https://app.codecov.io/gh/Finschia/ostracon/pull/764?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia) | Coverage Δ | | |---|---|---| | [libs/rand/random.go](https://app.codecov.io/gh/Finschia/ostracon/pull/764?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-bGlicy9yYW5kL3JhbmRvbS5nbw==) | `65.66% <ø> (-0.21%)` | :arrow_down: | ... and [10 files with indirect coverage changes](https://app.codecov.io/gh/Finschia/ostracon/pull/764/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia)