Skip to content

[RBF] Transactions with changed outputs incorrectly trigger Dropped event #344

@moisesPompilio

Description

@moisesPompilio

Describe the bug
When performing an RBF that changes the outputs using the WalletEvent API in BDK v2.2, the original transaction is marked as dropped instead of replaced. This seems incorrect since it is a valid RBF event.

To Reproduce

  1. Create a transaction and broadcast it.
  2. Broadcast an RBF version of it that changes the outputs (not only the fee).
  3. Observe that BDK emits a Dropped event instead of Replaced.

Expected behavior
The transaction should be detected as Replaced, not Dropped, since it is an RBF replacement.

Build environment

  • BDK 2.2
  • OS+version: Arch Linux
  • Rust/Cargo version: 1.90.0

Which backend(s) are relevant (if any)?

  • Electrum
  • Esplora
  • Bitcoin Core RPC
  • None / not backend-related (e.g. bdk_chain, bdk_core)
  • Other (please specify): ____

Is this blocking production use?

  • Yes
  • No

Project or organization (optional)
Testing integration between BDK and LDK.

Additional context
Found while testing the new BDK event model in LDK. The issue appears when the replaced transaction modifies outputs, as BDK seems to determine replacement status based only on outputs instead of inputs. The behavior is consistent across RPC, Esplora, and Electrum backends, indicating the issue likely originates from BDK’s event classification logic rather than the backend.

cc @oleonardolima
cc @notmandatory

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

Todo

Relationships

None yet

Development

No branches or pull requests

Issue actions