combine_psbt silently drops PSBTs that fail to combine (exit 0, incomplete output)
@tvpeter ci sta già lavorando.
Dal 16/9/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Describe the bug
bdk-cli wallet … combine_psbt discards the error from Psbt::combine, so when two PSBTs are incompatible (different unsigned transactions) the command exits 0 and prints a "combined" PSBT that is silently missing the other PSBT's inputs/signatures, instead of failing.
The fold that merges the PSBTs discards each combine result:
let final_psbt = psbts.into_iter().try_fold::<_, _, Result<Psbt, Error>>(
init_psbt,
|mut acc, x| {
let _ = acc.combine(x); // error dropped here
Ok(acc)
},
)?;
Per BIP174, Psbt::combine returns Err whenever the two PSBTs don't describe the same unsigned transaction (different txids/outputs).
To Reproduce
Two PSBTs with different unsigned transactions (BIP174-incompatible):
bdk-cli wallet -w demo combine_psbt $A $B
# exit 0; output == B, with A silently dropped
bdk-cli wallet -w demo combine_psbt $A $A
# control: valid combine, output == A
Expected behavior
- non-zero exit and an error explaining the PSBTs could not be combined.
Build environment
- BDK-CLI tag/commit: bdk-cli v4.0.0 bdk-cli 5b3cb000cfa09b91eb7660d0aa50bf6646cc5d7a
Additional context
- Lingua principale
- Rust
- Stelle
- 142
- Fork
- 99
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di bitcoindevkit/bdk-cli
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
bitcoindevkit/bdk-cli#332 · 2 commenti ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
bitcoindevkit/bdk-cli#330 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
bitcoindevkit/bdk-cli#318 ·
-
enhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
bitcoindevkit/bdk-cli#333 ·
-
bug
bitcoindevkit/bdk-cli#331 · 1 assegnatario ·
Tutte le issue di bitcoindevkit/bdk-cli
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
gitbutlerapp/gitbutler#15998 · 1 commento ·
-
bug triage:deciding
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
bitcoindevkit/bdk-ffi#1125 ·