Skip to content

Commit

Permalink
chore(ln-dlc-node): Give more specific name to wallet method
Browse files Browse the repository at this point in the history
  • Loading branch information
luckysori committed Feb 2, 2024
1 parent b72d481 commit 1bc842c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion crates/ln-dlc-node/src/ldk_node_wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,11 @@ where
Ok(utxos)
}

pub fn get_utxos_for_amount(&self, amount: u64, lock_utxos: bool) -> Result<Vec<Utxo>> {
pub fn get_utxos_for_dlc_funding_transaction(
&self,
amount: u64,
lock_utxos: bool,
) -> Result<Vec<Utxo>> {
let utxos = self.get_utxos()?;
// get temporarily reserved utxo from in-memory storage
let mut reserved_outpoints = self.locked_outpoints.lock();
Expand Down
3 changes: 2 additions & 1 deletion crates/ln-dlc-node/src/ln_dlc_wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ impl<S: TenTenOneStorage, N: Storage> dlc_manager::Wallet for LnDlcWallet<S, N>
Ok(sk)
}

// This is only used to create the funding transaction of a DLC or a DLC channel.
fn get_utxos_for_amount(
&self,
amount: u64,
Expand All @@ -278,7 +279,7 @@ impl<S: TenTenOneStorage, N: Storage> dlc_manager::Wallet for LnDlcWallet<S, N>
) -> Result<Vec<Utxo>, Error> {
let utxos = self
.ldk_wallet()
.get_utxos_for_amount(amount, lock_utxos)
.get_utxos_for_dlc_funding_transaction(amount, lock_utxos)
.map_err(|error| {
Error::InvalidState(format!("Could not find utxos for amount: {error:?}"))
})?;
Expand Down

0 comments on commit 1bc842c

Please sign in to comment.