Skip to content

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

Merged
evanlinjin merged 1 commit intobitcoindevkit:masterfrom
notmandatory:fix_overwrite_db
Jan 6, 2024
Merged

cherry-pick feat(wallet)!: add NonEmptyDatabase variant to NewError#1256
evanlinjin merged 1 commit intobitcoindevkit:masterfrom
notmandatory:fix_overwrite_db

Conversation

@notmandatory
Copy link
Copy Markdown
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
Copy Markdown
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
@notmandatory notmandatory mentioned this pull request Jan 6, 2024
12 tasks
@notmandatory notmandatory deleted the fix_overwrite_db 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

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants