Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For wallet change sets persist and verify descriptor hashes #1234

Closed

Conversation

notmandatory
Copy link
Member

@notmandatory notmandatory commented Dec 6, 2023

Description

fixes #1101, this is an alternative solution to #1203

The idea is rather than making changes in the chain module to handle persisting and verifying descriptor hash values at the wallet level. Any non-wallet chain module users can reference how we do it for wallet or can develop custom solutions.

Notes to the reviewers

I also cleaned up some related wallet module errors.

And I fixed some new clippy errors by replacing .or_insert_with(Default::default) with .or_default().

Changelog notice

Added

  • wallet::ChangeSet now includes the hashes of the wallet descriptors the Wallet was initially created with and on reloading from disk, if a ChangeSet has different descriptor hashes an error is thrown

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature

@notmandatory notmandatory self-assigned this Dec 6, 2023
@ValuedMammal
Copy link
Contributor

I like what you did moving some of the NewOrLoadError variants into LoadError.

@notmandatory notmandatory added the api A breaking API change label Jan 16, 2024
@notmandatory
Copy link
Member Author

Closing this in favor of solution in #1203. But I may create a separate PR later extracting some error cleanups that @ValuedMammal liked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api A breaking API change
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Reintroduce descriptor data to bdk::Wallet persistence
2 participants