Skip to content

Commit 4615cd8

Browse files
committed
Add config accessor to LSPS2ClientHandler
1 parent 153643c commit 4615cd8

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

lightning-liquidity/src/lsps2/client.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ where
7272
pending_messages: Arc<MessageQueue>,
7373
pending_events: Arc<EventQueue>,
7474
per_peer_state: RwLock<HashMap<PublicKey, Mutex<PeerState>>>,
75-
_config: LSPS2ClientConfig,
75+
config: LSPS2ClientConfig,
7676
}
7777

7878
impl<ES: Deref> LSPS2ClientHandler<ES>
@@ -82,17 +82,22 @@ where
8282
/// Constructs an `LSPS2ClientHandler`.
8383
pub(crate) fn new(
8484
entropy_source: ES, pending_messages: Arc<MessageQueue>, pending_events: Arc<EventQueue>,
85-
_config: LSPS2ClientConfig,
85+
config: LSPS2ClientConfig,
8686
) -> Self {
8787
Self {
8888
entropy_source,
8989
pending_messages,
9090
pending_events,
9191
per_peer_state: RwLock::new(new_hash_map()),
92-
_config,
92+
config,
9393
}
9494
}
9595

96+
/// Returns a reference to the used config.
97+
pub fn config(&self) -> &LSPS2ClientConfig {
98+
&self.config
99+
}
100+
96101
/// Request the channel opening parameters from the LSP.
97102
///
98103
/// This initiates the JIT-channel flow that, at the end of it, will have the LSP

0 commit comments

Comments
 (0)