Skip to content

Commit

Permalink
Merge pull request #2562 from get10101/fix/list-wallet-utxos
Browse files Browse the repository at this point in the history
fix: return only wallet unspent utxos
  • Loading branch information
luckysori authored May 24, 2024
2 parents 9a39e25 + e0aa9cc commit 739d9dd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions crates/xxi-node/src/on_chain_wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,8 @@ impl<D> OnChainWallet<D> {
pub(crate) fn get_utxos(&self) -> Vec<(OutPoint, TxOut)> {
let bdk = self.bdk.read();

bdk.tx_graph()
.all_txouts()
.map(|(outpoint, txout)| (outpoint, txout.clone()))
bdk.list_unspent()
.map(|local_output| (local_output.outpoint, local_output.txout))
.collect()
}

Expand Down

0 comments on commit 739d9dd

Please sign in to comment.