|
Ran
|
Jobs
1
|
Files
97
|
Run time
1min
|
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
28 of 28 new or added lines in 2 files covered. (100.0%)
20 existing lines in 12 files now uncovered.17455 of 21126 relevant lines covered (82.62%)
16824.26 hits per line
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 1 |
76.35 |
-2.18% | bitcoin/src/blockdata/locktime/absolute.rs |
| 1 |
45.9 |
1.29% | bitcoin/src/consensus/serde.rs |
| 1 |
85.37 |
-0.78% | bitcoin/src/crypto/sighash.rs |
| 1 |
83.59 |
-0.22% | bitcoin/src/network.rs |
| 1 |
94.98 |
-0.87% | bitcoin/src/psbt/serialize.rs |
| 1 |
65.91 |
-0.76% | hashes/src/serde_macros.rs |
| 1 |
66.67 |
-0.42% | units/src/parse.rs |
| 2 |
87.05 |
-1.37% | bitcoin/src/blockdata/witness.rs |
| 2 |
91.56 |
-0.41% | bitcoin/src/p2p/message.rs |
| 2 |
70.77 |
-2.42% | bitcoin/src/psbt/map/global.rs |
| 3 |
92.61 |
-1.57% | bitcoin/src/psbt/map/input.rs |
| 4 |
78.4 |
-0.53% | bitcoin/src/taproot/mod.rs |
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 16287837077.1 | 97 |
82.62 |
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|