mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-22 00:24:19 +01:00
cln-plugin: make available the configuration in plugin
There are several cases where you want to access to the configuration, and given the nature of the rust API, there is no way to access to the `configuration` field at any point after the configuration logic. Suggested-by: Sergi Delgado Segura <@sr-gi> Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
This commit is contained in:
committed by
Christian Decker
parent
141c836b39
commit
6c1e589ee8
@@ -495,6 +495,12 @@ where
|
||||
.next()
|
||||
.map(|co| co.value.clone().unwrap_or(co.default().clone()))
|
||||
}
|
||||
|
||||
/// return the cln configuration send to the
|
||||
/// plugin after the initialization.
|
||||
pub fn configuration(&self) -> Configuration {
|
||||
self.configuration.clone()
|
||||
}
|
||||
}
|
||||
|
||||
impl<S> PluginDriver<S>
|
||||
|
||||
Reference in New Issue
Block a user