Ran
|
Jobs
1
|
Files
40
|
Run time
1min
|
Badge
Embed ▾
README BADGES
|
push
github
Merge bitcoindevkit/bdk#1369: feat(chain): add `get` and `range` methods to `CheckPoint` 53942cced chore(chain)!: rm `From<LocalChain> for BTreeMap<u32, BlockHash>` (志宇) 2d1d95a68 feat(chain): impl `PartialEq` on `CheckPoint` (志宇) 9a62d5690 feat(chain): add `get` and `range` methods to `CheckPoint` (志宇) Pull request description: Partially fixes #1354 ### Description These methods allow us to query for checkpoints contained within the linked list by height and height range. This is useful to determine checkpoints to fetch for chain sources without having to refer back to the `LocalChain`. Currently this is not implemented efficiently, but in the future, we will change `CheckPoint` to use a skip list structure. ### Notes to the reviewers Please refer to the conversation in #1354 for more details. In summary, both `TxGraph::missing_heights` and `tx_graph::ChangeSet::missing_heights_from` are problematic in their own ways. Additionally, it's a better API for chain sources if we only need to lock our receiving structures twice (once to obtain initial state and once for applying the update). Instead of relying on methods such as `EsploraExt::update_local_chain` to get relevant checkpoints, we can use these query methods instead. This allows up to get rid of `::missing_heights`-esc methods and remove the need to lock receiving structures in the middle of the sync. ### Changelog notice * Added `get` and `range` methods to `CheckPoint` (and in turn, `LocalChain`). This simulates an API where we have implemented a skip list of checkpoints (to implement in the future). This is a better API because we can query for any height or height range with just a checkpoint tip instead of relying on a separate checkpoint index (which needs to live in `LocalChain`). * Changed `LocalChain` to have a faster `Eq` implementation. We now maintain an xor value ... (continued)
81 of 91 new or added lines in 3 files covered. (89.01%)
9615 of 11376 relevant lines covered (84.52%)
6557.51 hits per line
Lines | Coverage | ∆ | File |
---|---|---|---|
1 |
86.16 |
0.0% | crates/chain/src/tx_graph.rs |
9 |
81.28 |
2.69% | crates/chain/src/local_chain.rs |
ID | Job ID | Ran | Files | Coverage | |
---|---|---|---|---|---|
1 | 8578080656.1 | 40 |
84.52 |
GitHub Action Run |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|