feat(wallet): add configurable min_output_value filter#427
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #427 +/- ##
==========================================
+ Coverage 80.04% 80.29% +0.25%
==========================================
Files 24 24
Lines 5336 5395 +59
Branches 242 245 +3
==========================================
+ Hits 4271 4332 +61
+ Misses 987 984 -3
- Partials 78 79 +1
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:
|
|
Concept ACK. Related with the Also, #431 rewrites |
Description
Adds a runtime-only
min_output_value: Option<Amount>setting toWalletthat filters outputs below a chosen threshold across wallet queries and coin selection. Useful for applications that want to ignore dust/spam outputs without reimplementing BDK's internal logic.Closes #375
Affected methods:
balance,list_unspent,list_output,sent_and_received,net_value,tx_details, and coin selection.get_utxoand fee calculations are intentionally not filtered.Notes to the reviewers
min_output_valuerather thandust_thresholdto avoid confusion with the existing coin selectiondust_thresholdand Bitcoin's relay dust policy.CreateParams::min_output_value()/LoadParams::min_output_value(), or changed at runtime viaWallet::set_min_output_value()bdk_wallet, not pushed down intobdk_chain. The trade-off is that some methods are no longer thin wrappers aroundbdk_chain. This can be refactored downstream if desired.Changelog notice
min_output_valuesupport toWallet,CreateParams, andLoadParamsWallet::net_valuebalance,list_unspent,list_output,sent_and_received,net_value, and coin selection now honormin_output_valueChecklists
All Submissions:
just pbefore pushingNew Features: