Skip to content

Commit 5ec6819

Browse files
committed
Add config accessor to LSPS1ClientHandler
1 parent c5fd164 commit 5ec6819

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lightning-liquidity/src/lsps1/client.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ where
5454
pending_messages: Arc<MessageQueue>,
5555
pending_events: Arc<EventQueue>,
5656
per_peer_state: RwLock<HashMap<PublicKey, Mutex<PeerState>>>,
57-
_config: LSPS1ClientConfig,
57+
config: LSPS1ClientConfig,
5858
}
5959

6060
impl<ES: Deref> LSPS1ClientHandler<ES>
@@ -71,10 +71,15 @@ where
7171
pending_messages,
7272
pending_events,
7373
per_peer_state: RwLock::new(new_hash_map()),
74-
_config: config,
74+
config,
7575
}
7676
}
7777

78+
/// Returns a reference to the used config.
79+
pub fn config(&self) -> &LSPS1ClientConfig {
80+
&self.config
81+
}
82+
7883
/// Request the supported options from the LSP.
7984
///
8085
/// The user will receive the LSP's response via an [`SupportedOptionsReady`] event.

0 commit comments

Comments
 (0)