Skip to content

Commit 99f4aa0

Browse files
authored
fix!: deprecate get_utxos for list_unspent (#36)
1 parent cabf9aa commit 99f4aa0

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/client.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -796,10 +796,13 @@ mod test {
796796
let got = client.list_transactions(None).await.unwrap();
797797
assert_eq!(got.len(), 10);
798798

799-
// get_utxos
799+
// list_unspent
800800
// let's mine one more block
801801
mine_blocks(&bitcoind, 1, None).unwrap();
802-
let got = client.get_utxos().await.unwrap();
802+
let got = client
803+
.list_unspent(None, None, None, None, None)
804+
.await
805+
.unwrap();
803806
assert_eq!(got.len(), 3);
804807

805808
// listdescriptors

src/traits.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,10 @@ pub trait Wallet {
191191

192192
/// Gets all Unspent Transaction Outputs (UTXOs) for the underlying Bitcoin
193193
/// client's wallet.
194+
#[deprecated(
195+
since = "0.4.0",
196+
note = "Does not adhere with bitcoin core RPC naming. Use `list_unspent` instead"
197+
)]
194198
fn get_utxos(&self) -> impl Future<Output = ClientResult<Vec<ListUnspent>>> + Send;
195199

196200
/// Lists transactions in the underlying Bitcoin client's wallet.

0 commit comments

Comments
 (0)