• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

bitcoindevkit / bdk / 13877470107
79%

Build:
DEFAULT BRANCH: master
Ran 15 Mar 2025 11:12PM UTC
Jobs 1
Files 52
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 Mar 2025 11:05PM UTC coverage: 84.826% (+0.003%) from 84.823%
13877470107

push

github

evanlinjin
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

New Missed Lines in Diff

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

Uncovered Existing Lines

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
Jobs
ID Job ID Ran Files Coverage
1 13877470107.1 15 Mar 2025 11:12PM UTC 52
84.83
GitHub Action Run
Source Files on build 13877470107
  • Tree
  • List 52
  • Changed 11
  • Source Changed 0
  • Coverage Changed 11
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • f0faff69 on github
  • Prev Build on master (#13837203711)
  • Next Build on master (#13907582340)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc