|
Ran
|
Jobs
1
|
Files
52
|
Run time
1min
|
Badge
README BADGES
|
push
github
Merge bitcoindevkit/bdk#1839: Introduce `evicted-at`/`last-evicted` timestamps 0a20724e3 feat(examples): Update example crates to use `expected_spk_txids` (志宇) 1f8fc173b feat(core)!: Remove redundant `SyncRequest` methods (志宇) f42d5a854 feat(esplora): Handle spks with expected txids (志宇) 3ab499413 feat(electrum): Handle spks with expected txids (志宇) 64e4100a3 feat(chain): Add `TxGraph` methods that handle expected spk txids (志宇) b38569fd1 feat(core): Add expected txids to `SyncRequest` spks (Wei Chen) a2dfcb9f9 feat(chain)!: Change `TxGraph` to understand evicted-at & last-evicted (志宇) ae0336b20 feat(core): Add `TxUpdate::evicted_ats` (志宇) Pull request description: Partially Fixes #1740. Replaces #1765. Replaces #1811. ### Description This PR allows the receiving structures (`bdk_chain`, `bdk_wallet`) to detect and evict incoming transactions that are double spent (cancelled). We add a new field to `TxUpdate` (`TxUpdate::evicted_ats`), which in turn, updates the `last_evicted` timestamps that are tracked/persisted by `TxGraph`. This is similar to how `TxUpdate::seen_ats` update the `last_seen` timestamp in `TxGraph`. Transactions with a `last_evicted` timestamp higher than their `last_seen` timestamp are considered evicted. `SpkWithExpectedTxids` is introduced in `SpkClient` to track expected `Txid`s for each `spk`. During a sync, if any `Txid`s from `SpkWithExpectedTxids` are not in the current history of an `spk` obtained from the chain source, those `Txid`s are considered missing. Support for `SpkWithExpectedTxids` has been added to both `bdk_electrum` and `bdk_esplora` chain source crates. The canonicalization algorithm is updated to disregard transactions with a `last_evicted` ti... (continued)
265 of 304 new or added lines in 10 files covered. (87.17%)
3 existing lines in 2 files now uncovered.12371 of 14584 relevant lines covered (84.83%)
14103.51 hits per line
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 1 |
55.17 |
1.33% | crates/core/src/tx_update.rs |
| 6 |
68.78 |
-0.95% | crates/chain/src/indexer/keychain_txout.rs |
| 7 |
82.61 |
-0.42% | crates/chain/src/indexed_tx_graph.rs |
| 25 |
84.37 |
-1.66% | crates/chain/src/tx_graph.rs |
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 1 |
90.95 |
0.17% | crates/esplora/src/blocking_ext.rs |
| 2 |
84.37 |
-1.66% | crates/chain/src/tx_graph.rs |
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 13877470107.1 | 52 |
84.83 |
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|