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

bitcoindevkit / bdk / 13688754412
79%

Build:
DEFAULT BRANCH: master
Ran 06 Mar 2025 01:02AM 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

06 Mar 2025 12:57AM UTC coverage: 79.905% (-0.7%) from 80.576%
13688754412

push

github

evanlinjin
Merge bitcoindevkit/bdk#1684: Refactor file store

54251a7c9 docs(file_store): Show how to overwrite original file during recovery (志宇)
52f2061fd refactor(store)!: change Store's method and error names (nymius)
fc76d6603 feat(store): add `Bincode` error variant to FileError enum (nymius)
39987882b fix(store): replace `Path.exists` by `OpenOptions.create_new` (nymius)

Pull request description:

  ### Description

  The `Store::open` method doesn't recovers the previous `Store` state saved in the file and emplaces the file pointer just after the magic bytes prefix, this later is agravated by `Store::append_changeset` which sets the file pointer after the last written changeset. The combination of both causes the lost of any previous changeset there may have been in the file.

  Is natural to think this shouldn't be the expected behavior, as @KnowWhoami pointed out in #1517, and the `Store` should recover the previous changesets stored in the file store.

  The approach proposed in #1632 triggered a discussion about more changes in `Store`, which motivated the current refactor.

  Besides the fix for #1517, the following methods have been changed/renamed/repurposed in Store:
  - `create`: create file and retrieve store, if exists fail.
  - `load`: load changesets from file, aggregate them and return aggregated changeset and `Store`. If there are problems with decoding, fail.
  - `dump`: aggregate all changesets and return them.
  - `load_or_create`: try load or fallback to create.

  Fixes #1517.
  Overrides #1632.

  ### Notes to the reviewers

  **Load** return type is `Result<(Option<C>, Store), StoreErrorWithDump>` to allow methods which doesn't use `WalletPersister` to get the aggregated changeset right away.

  **Dump** is kept to allow `WalletPersister::initialize` method to retrieve the aggregated changeset without forcing ... (continued)

220 of 310 new or added lines in 3 files covered. (70.97%)

65 existing lines in 4 files now uncovered.

12144 of 15198 relevant lines covered (79.91%)

13819.22 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
3
28.57
-11.43% crates/file_store/src/lib.rs
87
71.07
-25.0% crates/file_store/src/store.rs

Uncovered Existing Lines

Lines Coverage ∆ File
2
68.56
-0.2% crates/chain/src/tx_graph.rs
3
28.57
-11.43% crates/file_store/src/lib.rs
16
68.52
-11.92% crates/file_store/src/entry_iter.rs
44
71.07
-25.0% crates/file_store/src/store.rs
Jobs
ID Job ID Ran Files Coverage
1 13688754412.1 06 Mar 2025 01:02AM UTC 52
79.91
GitHub Action Run
Source Files on build 13688754412
  • Tree
  • List 52
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 739b54ff on github
  • Prev Build on master (#13688082197)
  • Next Build on master (#13704065100)
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