|
Ran
|
Files
97
|
Run time
3s
|
Badge
README BADGES
|
push
github
feat(pow): add difficulty calculation for pre-digishield blocks (5,001-144,999) (#9) [XC-431](https://dfinity.atlassian.net/browse/XC-431?atlOrigin=eyJpIjoiNGZlYzIwYTg0NmE2NGNhOWE2NmUxZTBiNTdjNzE2NGIiLCJwIjoiaiJ9): This PR adds the correct difficulty calculation for pre-digishield blocks (i.e. blocks 5,001-144,999). It follows the previous PR https://github.com/dfinity/rust-dogecoin/pull/8 which added the logic for block period 0-5,000. The main change is the addition of the correct `min_timespan` for a difficulty adjustment interval allowed for a given block height, as defined by [dogecoin's difficulty adjustment algorithm](https://github.com/dogecoin/dogecoin/blob/51cbc1fd5/src/dogecoin.cpp#L57). The relevant code can be found here: https://github.com/dfinity/rust-dogecoin/commit/09daa88ab#diff-874f3e7cf5069afa5a60ceaf4b9542d0eR471-R478 [XC-431]: https://dfinity.atlassian.net/browse/XC-431?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
17455 of 21126 relevant lines covered (82.62%)
16824.26 hits per line
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|