]> Untitled Git - bdk-cli/commitdiff
feat(utxo-locking): Limit locking to known utxos
authorVihiga Tyonum <withtvpeter@gmail.com>
Fri, 17 Jul 2026 10:55:50 +0000 (11:55 +0100)
committerVihiga Tyonum <withtvpeter@gmail.com>
Fri, 17 Jul 2026 10:55:50 +0000 (11:55 +0100)
- This change removes locking utxos that are not
known to the wallet at the time of locking.

src/handlers/offline.rs

index 993d10cbc68a5e3c12822a71b10f253e40ac653b..725b29ca6bb1becb29cd3d60c77e04025eb9607f 100644 (file)
@@ -874,7 +874,8 @@ impl AppCommand<AppContext<OfflineOperations<'_>>> for LockUtxoCommand {
         let wallet = &mut ctx.state.wallet;
         for out_point in &self.utxos {
             if wallet.get_utxo(*out_point).is_none() {
-                eprintln!("warning: {out_point} is not a known wallet UTXO; locking anyway");
+                eprintln!("warning: {out_point} is not a known wallet UTXO; skipping");
+                continue;
             }
             wallet.lock_outpoint(*out_point);
         }