From 49e7f776b211baa9739c7574086891da1f8e9795 Mon Sep 17 00:00:00 2001 From: 223880 Date: Thu, 5 Sep 2024 06:59:50 -0300 Subject: [PATCH] Fix --- README.md | 1 + src/lending/channel.rs | 3 +++ src/lending/lsp.rs | 15 ++++++++++++++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c2d50fc..30f8f27 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,7 @@ Check [here](https://github.com/AreaLayer/Lightning-Lending/blob/main/doc/run.md - [X] LSP (WIP) - [ ] Bitcoin Knots - [ ] Mutinynet +- [ ] CLN Plugin ## Contributors diff --git a/src/lending/channel.rs b/src/lending/channel.rs index 59009fc..14eed63 100644 --- a/src/lending/channel.rs +++ b/src/lending/channel.rs @@ -9,6 +9,8 @@ use lightning::ln::peer_handler::{MessageHandler, PeerHandler, SocketDescriptor} use lightning::util::config::UserConfig; use lightning::ln::BOLT12; use ldk_node::lightning::ln::msgs::SocketAddress; +use lightning_liquidity::LiquidityProvider; +use lightning_liquidity::LSPS0Client; use bitcoin::network::constants::Network; @@ -21,6 +23,7 @@ let channel_manager = ChannelManager::new( Arc::new(keys_manager.clone()), // Clone because it's used in multiple places Arc::new(fee_estimator.clone()), Arc::new(tx_broadcaster.clone()), + Arc::new(LSPS0Client.clone()), Arc::new(logger.clone()), config, network, diff --git a/src/lending/lsp.rs b/src/lending/lsp.rs index 08d7a62..7df0919 100644 --- a/src/lending/lsp.rs +++ b/src/lending/lsp.rs @@ -12,4 +12,17 @@ impl From for Event { fn from(event: LSPS0ClientEvent) -> Self { Event::LSPS0Client(event) } -} \ No newline at end of file +} + +impl From for Event { + fn from(event: LSPS2ClientEvent) -> Self { + Event::LSPS2Client(event) + } +} + +impl From for Event { + fn from(event: LSPS2ServiceEvent) -> Self { + Event::LSPS2Service(event) + } +} +