Skip to content

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
Collaborator

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.

@notmandatory notmandatory deleted the feat/verify_desc branch May 26, 2025 21:40
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

Archived in project

Development

Successfully merging this pull request may close these issues.

Reintroduce descriptor data to bdk::Wallet persistence

2 participants