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

bitcoindevkit / bdk / 13688754412 / 1
79%
master: 79%

Build:
DEFAULT BRANCH: master
Ran 06 Mar 2025 01:02AM UTC
Files 52
Run time 1s
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.1

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)

12144 of 15198 relevant lines covered (79.91%)

13819.22 hits per line

Source Files on job 13688754412.1
  • Tree
  • List 52
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 13688754412
  • 739b54ff on github
  • Prev Job for on master (#13688082197.1)
  • Next Job for on master (#13704065100.1)
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