Skip to content

fix!: preserve fee bump failure variants - #1158

Open
muawiya1 wants to merge 1 commit into
bitcoindevkit:masterfrom
muawiya1:fix/preserve-fee-bump-errors
Open

muawiya1 wants to merge 1 commit into
bitcoindevkit:masterfrom
muawiya1:fix/preserve-fee-bump-errors

Conversation

@muawiya1

Copy link
Copy Markdown

Description

BuildFeeBumpError from bdk_wallet has six variants, but the conversion to CreateTxError collapsed five of them into UnknownUtxo or FeeRateTooLow. Txids were reported in an outpoint field, and FeeRateUnavailable was reported as a low fee rate, so apps couldn't tell the failures apart.

This adds TransactionNotFound, TransactionConfirmed, IrreplaceableTransaction, FeeRateUnavailable and InvalidOutputIndex to CreateTxError and maps each upstream case to its own variant.

Fixes #1103

Notes to the reviewers

  • This is an API-breaking change. Apps that switch/when over CreateTxError exhaustively will need to handle the five new variants. FeeRateUnavailable was previously reported as FeeRateTooLow, so code catching that variant after BumpFeeTxBuilder.finish() will no longer see it.
  • The new messages use upstream's Display wording, lowercased to match this file.

Documentation

Changelog

changelog: breaking

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing
  • I've added exactly one changelog:* label
  • I've linked the relevant upstream docs or specs above

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

Fee bump errors from `bdk_wallet` were collapsed into `UnknownUtxo`
or `FeeRateTooLow`, so apps could not tell them apart.

Add `TransactionNotFound`, `TransactionConfirmed`,
`IrreplaceableTransaction`, `FeeRateUnavailable` and
`InvalidOutputIndex` to `CreateTxError` and map each upstream case
to its own variant.

Fixes bitcoindevkit#1103
@muawiya1
muawiya1 requested a review from a team as a code owner November 17, 2026 13:34
@notmandatory notmandatory moved this from Todo to Ready to Review in BDK-Bindings Nov 17, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready to Review

Development

Successfully merging this pull request may close these issues.

fix!: preserve fee bump failure variants

1 participant