Ran
|
Files
40
|
Run time
0s
|
Badge
Embed ▾
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)
8009 of 10120 relevant lines covered (79.14%)
5197.28 hits per line
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|