Skip to content

Commit 82f28a7

Browse files
committed
Move LSPSXClientConfig to liquidity
.. for consistency, as we're about to add `LSPS2ServiceConfig` there, too.
1 parent 1357121 commit 82f28a7

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

src/builder.rs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use crate::gossip::GossipSource;
1818
use crate::io::sqlite_store::SqliteStore;
1919
use crate::io::utils::{read_node_metrics, write_node_metrics};
2020
use crate::io::vss_store::VssStore;
21-
use crate::liquidity::LiquiditySourceBuilder;
21+
use crate::liquidity::{LSPS1ClientConfig, LSPS2ClientConfig, LiquiditySourceBuilder};
2222
use crate::logger::{log_error, log_info, LdkLogger, LogLevel, LogWriter, Logger};
2323
use crate::message_handler::NodeCustomMessageHandler;
2424
use crate::payment::store::PaymentStore;
@@ -105,20 +105,6 @@ struct LiquiditySourceConfig {
105105
lsps2_client: Option<LSPS2ClientConfig>,
106106
}
107107

108-
#[derive(Debug, Clone)]
109-
struct LSPS1ClientConfig {
110-
node_id: PublicKey,
111-
address: SocketAddress,
112-
token: Option<String>,
113-
}
114-
115-
#[derive(Debug, Clone)]
116-
struct LSPS2ClientConfig {
117-
node_id: PublicKey,
118-
address: SocketAddress,
119-
token: Option<String>,
120-
}
121-
122108
#[derive(Clone)]
123109
enum LogWriterConfig {
124110
File { log_file_path: Option<String>, max_log_level: Option<LogLevel> },

src/liquidity.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@ struct LSPS1Client {
5252
Mutex<HashMap<RequestId, oneshot::Sender<LSPS1OrderStatus>>>,
5353
}
5454

55+
#[derive(Debug, Clone)]
56+
pub(crate) struct LSPS1ClientConfig {
57+
pub node_id: PublicKey,
58+
pub address: SocketAddress,
59+
pub token: Option<String>,
60+
}
61+
5562
struct LSPS2Client {
5663
lsp_node_id: PublicKey,
5764
lsp_address: SocketAddress,
@@ -61,6 +68,13 @@ struct LSPS2Client {
6168
pending_buy_requests: Mutex<HashMap<RequestId, oneshot::Sender<LSPS2BuyResponse>>>,
6269
}
6370

71+
#[derive(Debug, Clone)]
72+
pub(crate) struct LSPS2ClientConfig {
73+
pub node_id: PublicKey,
74+
pub address: SocketAddress,
75+
pub token: Option<String>,
76+
}
77+
6478
pub(crate) struct LiquiditySourceBuilder<L: Deref>
6579
where
6680
L::Target: LdkLogger,

0 commit comments

Comments
 (0)