]> Untitled Git - bdk/commit
refactor(store)!: change Store's method and error names
authornymius <155548262+nymius@users.noreply.github.com>
Fri, 28 Feb 2025 04:39:57 +0000 (15:39 +1100)
committernymius <155548262+nymius@users.noreply.github.com>
Wed, 5 Mar 2025 23:49:59 +0000 (10:49 +1100)
commit52f2061fd94fb4f739779949675c707bb4fd0776
tree3bdea57d14bae66c1f288c7400245c720fd72dd3
parentfc76d6603fa354386de8590368ab10881cbd949e
refactor(store)!: change Store's method and error names

The changes in this commit were motivated due to a bug in the
`StoreFile` which caused old data to be lost if the file was `open`
instead of created and new data was appended. The bugfix later motivated
a general name cleanup in StoreFile's methods and errors and some minor
changes in their signatures. FileError was renamed to StoreError, which
now includes the IterError variants, allowing the remplacement of the
former form. The new StoreFile methods are:
- create: create file in write only mode or fail if file exists.
- load: open existing file, check integrity of content and retrieve
  Store.
- append: add new changesets to Store. Do nothing if changeset is empty.
- dump: aggregate and retrieve all stored changesets in store.
- load_or_create: load if file exists, create if not, and retrieve
  Store.
README.md
crates/file_store/src/entry_iter.rs
crates/file_store/src/lib.rs
crates/file_store/src/store.rs
example-crates/example_bitcoind_rpc_polling/src/main.rs
example-crates/example_cli/src/lib.rs
example-crates/example_electrum/src/main.rs
example-crates/example_esplora/src/main.rs