Ran
|
Jobs
1
|
Files
40
|
Run time
2s
|
Badge
README BADGES
|
push
github
Merge bitcoindevkit/bdk#1034: Implement linked-list `LocalChain` and update chain-src crates/examples b206a985c fix: Even more refactoring to code and documentation (志宇) bea8e5aff fix: `TxGraph::missing_blocks` logic (志宇) db15e03bd fix: improve more docs and more refactoring (志宇) 95312d4d0 fix: docs and some minor refactoring (志宇) 8bf7a997f Refactor `debug_assertions` checks for `LocalChain` (志宇) 315e7e0b4 fix: rm duplicate `bdk_tmp_plan` module (志宇) af705da1a Add exclusion of example cli `*.db` files in `.gitignore` (志宇) eabeb6ccb Implement linked-list `LocalChain` and update chain-src crates/examples (志宇) Pull request description: Fixes #997 Replaces #1002 ### Description This PR changes the `LocalChain` implementation to have blocks stored as a linked-list. This allows the data-src thread to hold a shared ref to a single checkpoint and have access to the whole history of checkpoints without cloning or keeping a lock on `LocalChain`. The APIs of `bdk::Wallet`, `esplora` and `electrum` are also updated to reflect these changes. Note that the `esplora` crate is rewritten to anchor txs in the confirmation block (using the esplora API's tx status block_hash). This guarantees 100% consistency between anchor blocks and their transactions (instead of anchoring txs to the latest tip). `ExploraExt` now has separate methods for updating the `TxGraph` and `LocalChain`. A new method `TxGraph::missing_blocks` is introduced for finding "floating anchors" of a `TxGraph` update (given a chain). Additional changes: * `test_local_chain.rs` is refactored to make test cases easier to write. Additional tests are also added. * Examples are updated. * Exclude example-cli `*.db` files in `.gitignore`.... (continued)
741 of 741 new or added lines in 8 files covered. (100.0%)
8009 of 10120 relevant lines covered (79.14%)
5197.28 hits per line
Lines | Coverage | ∆ | File |
---|---|---|---|
1 |
86.85 |
0.96% | crates/chain/src/tx_graph.rs |
5 |
66.97 |
0.0% | crates/chain/src/keychain.rs |
9 |
87.36 |
-0.07% | crates/bdk/src/wallet/mod.rs |
10 |
8.33 |
-2.78% | crates/esplora/src/lib.rs |
32 |
85.62 |
8.18% | crates/chain/src/local_chain.rs |
86 |
0.0 |
0.0% | crates/electrum/src/electrum_ext.rs |
145 |
0.0 |
0.0% | crates/esplora/src/async_ext.rs |
155 |
0.0 |
0.0% | crates/esplora/src/blocking_ext.rs |
Lines | Coverage | ∆ | File |
---|---|---|---|
1 |
87.36 |
-0.07% | crates/bdk/src/wallet/mod.rs |
2 |
85.62 |
8.18% | crates/chain/src/local_chain.rs |
4 |
0.0 |
0.0% | crates/electrum/src/electrum_ext.rs |
6 |
0.0 |
0.0% | crates/esplora/src/async_ext.rs |
7 |
0.0 |
0.0% | crates/esplora/src/blocking_ext.rs |
ID | Job ID | Ran | Files | Coverage | |
---|---|---|---|---|---|
1 | 5748191480.1 | 40 |
79.14 |
GitHub Action Run |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|