]> Untitled Git - bdk-cli/commitdiff
[wallet] Stop implicitly enforcing manaul selection by .add_utxo
authorLLFourn <lloyd.fourn@gmail.com>
Thu, 22 Oct 2020 01:07:51 +0000 (12:07 +1100)
committerLLFourn <lloyd.fourn@gmail.com>
Fri, 23 Oct 2020 02:54:59 +0000 (13:54 +1100)
This makes it possible to choose a UTXO manually without having to
choose them *all* manually. I introduced the `manually_selected_only`
option to enforce that only manually selected utxos can be used.

To stop the cli semantics changing I made the `utxos` keep the old
behaviour by calling `manually_selected_only`.

src/cli.rs

index bf50d961263c01f260ee2d7dd8b3d791af45d180..06b74fcb4196a786b9f601ee79c58e6c3d403187 100644 (file)
@@ -406,7 +406,7 @@ where
                 .map(|i| parse_outpoint(i))
                 .collect::<Result<Vec<_>, _>>()
                 .map_err(|s| Error::Generic(s.to_string()))?;
-            tx_builder = tx_builder.utxos(utxos);
+            tx_builder = tx_builder.utxos(utxos).manually_selected_only();
         }
 
         if let Some(unspendable) = sub_matches.values_of("unspendable") {