Skip to content

feat: Add exclude_unconfirmed and exclude_below_confirmations #258

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

evanlinjin
Copy link
Member

@evanlinjin evanlinjin commented Jun 6, 2025

Fixes #143

Description

These are convenience methods on TxBuilder that can be used to filter out outpoints which do not meet a given confirmation threshold.

Previously, I advocated a feature freeze on TxBuilder, but I believe we can make an exception for these helper methods, as they do not broaden the TxBuilder interface’s error surface. Going forward, all other development should be directed to the bdk-tx repository and crate.

cc. @tnull

Changelog notice

Added:
- `TxBuilder::exclude_unconfirmed`
- `TxBuilder::exclude_below_confirmations`

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo +nightly fmt and cargo clippy before committing

New Features:

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

@coveralls
Copy link

coveralls commented Jun 6, 2025

Pull Request Test Coverage Report for Build 15491418848

Details

  • 92 of 95 (96.84%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 85.673%

Changes Missing Coverage Covered Lines Changed/Added Lines %
wallet/src/wallet/tx_builder.rs 92 95 96.84%
Totals Coverage Status
Change from base Build 15476130196: 0.1%
Covered Lines: 7469
Relevant Lines: 8718

💛 - Coveralls

@evanlinjin evanlinjin force-pushed the feature/exclude_below_confirmations branch from 9bba85c to 059f6af Compare June 6, 2025 13:11
@evanlinjin evanlinjin self-assigned this Jun 6, 2025
@evanlinjin evanlinjin added this to the Wallet 2.1.0 milestone Jun 6, 2025
@evanlinjin evanlinjin moved this to Needs Review in BDK Wallet Jun 6, 2025
These are convenience methods on `TxBuilder` that can be used to filter
out outpoints which do not meet a given confirmation threshold.
@evanlinjin evanlinjin force-pushed the feature/exclude_below_confirmations branch from 059f6af to 6400343 Compare June 6, 2025 13:14
@evanlinjin evanlinjin marked this pull request as ready for review June 6, 2025 13:15
@evanlinjin evanlinjin requested a review from ValuedMammal June 6, 2025 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs Review
Development

Successfully merging this pull request may close these issues.

Expose way to select only (n-)confirmed UTXOs for TX creation
2 participants