-
Notifications
You must be signed in to change notification settings - Fork 38.8k
refactor: Use util::Result class for wallet loading #25722
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
base: master
Are you sure you want to change the base?
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code Coverage & BenchmarksFor details see: https://corecheck.dev/bitcoin/bitcoin/pulls/25722. ReviewsSee the guideline for information on the review process. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. LLM Linter (✨ experimental)Possible typos and grammar issues:
2025-12-16 |
bc4172e to
a09c21c
Compare
a09c21c to
e7457d0
Compare
-BEGIN VERIFY SCRIPT- git grep -l DatabaseStatus src | xargs sed -i s/DatabaseStatus/DatabaseError/g sed -i '/^ SUCCESS,$/d' src/wallet/db.h -END VERIFY SCRIPT-
Add util::Result support for returning warning messages and multiple errors, not just a single error string. This provides a way for functions to report errors and warnings in a standard way, and simplifies interfaces. The functionality is unit tested here, and put to use in followup PR bitcoin#25722
Suggested by Martin Leitner-Ankerl <[email protected]> bitcoin#25722 (comment) Co-authored-by: Martin Leitner-Ankerl <[email protected]>
d3e677f to
2c7996d
Compare
|
🐙 This pull request conflicts with the target branch and needs rebase. |
Add util::Result support for returning warning messages and multiple errors, not just a single error string. This provides a way for functions to report errors and warnings in a standard way, and simplifies interfaces. The functionality is unit tested here, and put to use in followup PR bitcoin#25722
Suggested by Martin Leitner-Ankerl <[email protected]> bitcoin#25722 (comment) Co-authored-by: Martin Leitner-Ankerl <[email protected]>
Add util::Result support for returning warning messages and multiple errors, not just a single error string. This provides a way for functions to report errors and warnings in a standard way, and simplifies interfaces. The functionality is unit tested here, and put to use in followup PR bitcoin#25722
Suggested by Martin Leitner-Ankerl <[email protected]> bitcoin#25722 (comment) Co-authored-by: Martin Leitner-Ankerl <[email protected]>
Add util::Result support for returning warning messages and multiple errors, not just a single error string. This provides a way for functions to report errors and warnings in a standard way, and simplifies interfaces. The functionality is unit tested here, and put to use in followup PR bitcoin#25722
Suggested by Martin Leitner-Ankerl <[email protected]> bitcoin#25722 (comment) Co-authored-by: Martin Leitner-Ankerl <[email protected]>
This is based on #25665 + #26022. The non-base commits are:
9151b903bfe7Add temporary ResultExtract helper for porting to util::Result6fc7c310918frefactor: Use util::Result class in wallet/sqlite1323422c5ff8refactor: Use util::Result class in wallet/migrate3973473d60berefactor: Use util::Result class in wallet::MakeDatabase6440e70fafd6refactor: Use util::Result class in wallet/dumpd7f3b0ec3284refactor: Use util::Result class in wallet/wallettoolbccb6682eb72refactor: Use util::Result class in wallet/wallet7aa597acc363refactor: Use util::Result class in wallet/load8fb85857a4adrefactor: Use util::Result class in wallet/rpc40fde9a6a71brefactor: Use util::Result class in wallet/interfaces07a929c35a56refactor: Use util::Result class in wallet/test329fa7ad4df5Drop temporary ResultExtract helper for porting to util::Result2c7996d7c398scripted-diff: replace wallet DatabaseStatus with DatabaseErrorWallet loading functions up and down the stack have lots of error and warning parameters, and return error information in different ways. This PR makes them uniformly return
util::Result, without changing behavior.