|
Ran
|
Files
52
|
Run time
1s
|
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)
12371 of 14584 relevant lines covered (84.83%)
14103.51 hits per line
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|