Skip to content

Commit 01c6f49

Browse files
committed
Impl close_channel
1 parent 6a8a194 commit 01c6f49

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/lib.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -664,9 +664,13 @@ impl LdkLite {
664664
}
665665
}
666666

667-
// // Close a previously opened channel
668-
// pub close_channel(&mut self, channel_id: u64) -> Result<()>;
669-
//
667+
/// Close a previously opened channel.
668+
pub fn close_channel(
669+
&self, channel_id: &[u8; 32], counterparty_node_id: &PublicKey,
670+
) -> Result<(), Error> {
671+
Ok(self.channel_manager.close_channel(channel_id, counterparty_node_id)?)
672+
}
673+
670674
/// Send a payement given an invoice.
671675
pub fn send_payment(&self, invoice: Invoice) -> Result<PaymentHash, Error> {
672676
if self.running.read().unwrap().is_none() {

0 commit comments

Comments
 (0)