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

cherry-pick feat(wallet)!: add NonEmptyDatabase variant to NewError #1256

Merged
merged 1 commit into from
Jan 6, 2024

Conversation

notmandatory
Copy link
Member

Description

NewError is the error type when constructing a wallet with Wallet::new. We want this to return an error when the database already contains data (in which case, the caller should use load or new_or_load).

Notes to the reviewers

This is cherry-picked from #1172 so that we can add it to the alpha.3 release.

Changelog notice

Change

  • Return NonEmptyDatabase error when constructing a wallet with Wallet::new if the file already contains data (in which case, the caller should use load or new_or_load).

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 Jan 6, 2024
@notmandatory notmandatory added this to the 1.0.0-alpha.3 milestone Jan 6, 2024
`NewError` is the error type when constructing a wallet with
`Wallet::new`. We want this to return an error when the database already
contains data (in which case, the caller should use `load` or
`new_or_load`).
Copy link
Member

@evanlinjin evanlinjin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK a1d34af

@evanlinjin evanlinjin merged commit d718299 into bitcoindevkit:master Jan 6, 2024
12 checks passed
@notmandatory notmandatory mentioned this pull request Jan 6, 2024
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants