From 1bc842ccbcefe015339e18ed8b1b912de5680415 Mon Sep 17 00:00:00 2001 From: Lucas Soriano del Pino Date: Wed, 31 Jan 2024 14:21:33 +1100 Subject: [PATCH] chore(ln-dlc-node): Give more specific name to wallet method --- crates/ln-dlc-node/src/ldk_node_wallet.rs | 6 +++++- crates/ln-dlc-node/src/ln_dlc_wallet.rs | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/crates/ln-dlc-node/src/ldk_node_wallet.rs b/crates/ln-dlc-node/src/ldk_node_wallet.rs index 8a3051ffa..634b5e732 100644 --- a/crates/ln-dlc-node/src/ldk_node_wallet.rs +++ b/crates/ln-dlc-node/src/ldk_node_wallet.rs @@ -179,7 +179,11 @@ where Ok(utxos) } - pub fn get_utxos_for_amount(&self, amount: u64, lock_utxos: bool) -> Result> { + pub fn get_utxos_for_dlc_funding_transaction( + &self, + amount: u64, + lock_utxos: bool, + ) -> Result> { let utxos = self.get_utxos()?; // get temporarily reserved utxo from in-memory storage let mut reserved_outpoints = self.locked_outpoints.lock(); diff --git a/crates/ln-dlc-node/src/ln_dlc_wallet.rs b/crates/ln-dlc-node/src/ln_dlc_wallet.rs index 8c753c2f9..9b2235e8d 100644 --- a/crates/ln-dlc-node/src/ln_dlc_wallet.rs +++ b/crates/ln-dlc-node/src/ln_dlc_wallet.rs @@ -270,6 +270,7 @@ impl dlc_manager::Wallet for LnDlcWallet 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, @@ -278,7 +279,7 @@ impl dlc_manager::Wallet for LnDlcWallet ) -> Result, 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:?}")) })?;