Skip to content

Conversation

@thunderbiscuit
Copy link
Member

The src/wallet/mod.rs is 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.rs file 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:

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature

Bugfixes:

  • 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

@codecov
Copy link

codecov bot commented Feb 6, 2026

Codecov Report

❌ Patch coverage is 0% with 45 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.46%. Comparing base (35502e0) to head (a9bfdbc).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
src/wallet/error.rs 0.00% 45 Missing ⚠️
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           
Flag Coverage Δ
rust 86.46% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ValuedMammal ValuedMammal moved this to Needs Review in BDK Wallet Feb 6, 2026
@ValuedMammal ValuedMammal added this to the Wallet 3.0.0 milestone Feb 6, 2026
@thunderbiscuit
Copy link
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.

@ValuedMammal
Copy link
Collaborator

Also we're not using ApplyBlockError at all it seems.

Copy link
Collaborator

@ValuedMammal ValuedMammal left a comment

Choose a reason for hiding this comment

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

ACK a9bfdbc

I tested by replicating the move and found no significant differences.

@ValuedMammal ValuedMammal merged commit c2d0850 into bitcoindevkit:master Feb 9, 2026
17 of 18 checks passed
@github-project-automation github-project-automation bot moved this from Needs Review to Done in BDK Wallet Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants