Refactor: Move Wallet errors into their dedicated file#378
Merged
ValuedMammal merged 1 commit intobitcoindevkit:masterfrom Feb 9, 2026
Merged
Conversation
6175d3d to
a9bfdbc
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #378 +/- ##
=======================================
Coverage 86.46% 86.46%
=======================================
Files 25 25
Lines 8527 8527
=======================================
Hits 7373 7373
Misses 1154 1154
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
Author
|
It's weird because it's a clean move of the types, no new code, but the codecov tool treats it as new code and finds it has 0% coverage. |
Collaborator
|
Also we're not using |
ValuedMammal
approved these changes
Feb 9, 2026
Collaborator
ValuedMammal
left a comment
There was a problem hiding this comment.
ACK a9bfdbc
I tested by replicating the move and found no significant differences.
8 tasks
ValuedMammal
added a commit
that referenced
this pull request
Feb 17, 2026
20fea22 refactor: remove unused ApplyBlockError (thunderbiscuit) Pull request description: This was caught by ValuedMammal here: #378 (comment) ### Description This PR removes an unused error. An alternative could be to repurpose the type to be used as the error for the `apply_block*` methods, as it seems to be adequately named to go along with `Wallet::apply_block`. ### Changelog notice - Removed `ApplyBlockError` from the public API ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) * [x] I ran `just p` before pushing #### New Features: * [ ] I've added tests for the new feature * [ ] I've added docs for the new feature #### Bugfixes: * [x] This pull request breaks the existing API * [ ] I've added tests to reproduce the issue which are now passing * [ ] I'm linking the issue being fixed by this PR ACKs for top commit: luisschwab: ACK 20fea22 evanlinjin: ACK 20fea22 110CodingP: ACK [20fea22](20fea22) Tree-SHA512: 964ca874cce8778a7ca72a9bcc438894a9a422fd688ba9fbf61e580357e322dd05f17ee0c6ebedb746597342b6983d150120a32ce267418b7622f7960255ff63
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
src/wallet/mod.rsis currently a very big file (3200 lines exactly), and over the course of my work on #318 I noticed a few small refactors that could help keep things tidy (ok it's a drop in the bucket but still a win!) and reduce the line count a bit.Notes to the reviewers
We had 3 wallet-related errors that were defined in the mod.rs file, but we also have a dedicated
error.rsfile which states://! Errors that can be thrown by the `Wallet`The errors belong there in my opinion, and this is a small refactor moving them over.
Changelog notice
No changelog required.
Checklists
All Submissions:
just pbefore pushingNew Features:
Bugfixes: