Ran
|
Jobs
1
|
Files
40
|
Run time
1min
|
Badge
README BADGES
|
push
github
Merge bitcoindevkit/bdk#1373: Wrap transactions as `Arc<Transaction>` in `TxGraph` <a class=hub.com/bitcoindevkit/bdk/commit/<a class="double-link" href="https://git"><a class=hub.com/bitcoindevkit/bdk/commit/8ab58af093ff295b86c3f8189aa96dea313092c4">8ab58af09 feat(chain)!: wrap `TxGraph` txs with `Arc` (志宇) Pull request description: ### Description This PR makes `TxGraph` store transactions as `Arc<Transaction>`. `Arc<Transaction>` can be shared between the chain-source and receiving structures. This allows the chain-source to keep the already-fetched transactions (save bandwith) and have a shared pointer to the transaction (save memory). Our current logic to avoid re-fetching transactions is to refer back to the receiving structures. However, this means an additional round of locking our receiving structures. ### Notes to the reviewers This will make more sense once I update the esplora/electrum chain sources to make use of both #1369 and this PR. The result would be chain sources which would only require locking the receiving structures twice (once for initiating the update, and once for applying the update). ### Changelog notice * Changed `TxGraph` to store transactions as `Arc<Transaction>`. This allows chain-sources to cheaply keep a copy of already-fetched transactions. ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) * [x] I ran `cargo fmt` and `cargo clippy` before committing #### New Features: * [ ] I've added tests for the new feature * [x] I've added docs for the new feature ACKs for top commit: LLFourn: ACK 8ab58af093ff295b86c3f8189aa96dea313092c4 notmandatory: ACK 8ab58af093ff295b86c3f8189aa96dea313092c4 Tree-SHA512: 81d7ad35f1d4f6e7835701094ce66bdb02f
58 of 65 new or added lines in 2 files covered. (89.23%)
9600 of 11370 relevant lines covered (84.43%)
5805.44 hits per line
Lines | Coverage | ∆ | File |
---|---|---|---|
1 |
82.88 |
0.02% | crates/bdk/src/wallet/mod.rs |
6 |
86.16 |
-0.14% | crates/chain/src/tx_graph.rs |
ID | Job ID | Ran | Files | Coverage | |
---|---|---|---|---|---|
1 | 8497341000.1 | 40 |
84.43 |
GitHub Action Run |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|