Describe the bug
- Alice has an empty wallet
- Alice receives a transaction (called
tx1a) from Bob and observes it in the mempool.
- Bob double-spends
tx1a creating tx1b
- A block is mined containing
tx1b
- Alice observes
tx1b in a block.
Alice will still consider tx1a as a pending transaction.
To Reproduce
See this https://github.com/ErikDeSmedt/bdk-gists/blob/master/tests/wallet.rs
Expected behavior
I would expect that Alice her wallet wouldn't use tx1a anymore. The output
- should not be used for coin-selection
- should not be part of the balance (untrusted_pending)
Build environment
- BDK tag/commit:
1.0.0-beta.5
- OS+version: debian
- Rust/Cargo version: cargo 1.79.0 (ffa9cf99a 2024-06-03)
Additional context
I discovered this bug in a test-case where the entire wallet was unusable.
Describe the bug
tx1a) from Bob and observes it in the mempool.tx1acreatingtx1btx1btx1bin a block.Alice will still consider
tx1aas a pending transaction.To Reproduce
See this https://github.com/ErikDeSmedt/bdk-gists/blob/master/tests/wallet.rs
Expected behavior
I would expect that Alice her wallet wouldn't use
tx1aanymore. The outputBuild environment
1.0.0-beta.5Additional context
I discovered this bug in a test-case where the entire wallet was unusable.