mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-22 00:24:19 +01:00
cln_plugin: Configure "dynamic" field in "getmanifest" message
This commit is contained in:
committed by
Christian Decker
parent
71cd07ea61
commit
42783aaa92
@@ -48,6 +48,7 @@ where
|
||||
configuration: Option<Configuration>,
|
||||
rpcmethods: HashMap<String, RpcMethod<S>>,
|
||||
subscriptions: HashMap<String, Subscription<S>>,
|
||||
dynamic: bool,
|
||||
}
|
||||
|
||||
impl<S, I, O> Builder<S, I, O>
|
||||
@@ -66,6 +67,7 @@ where
|
||||
options: vec![],
|
||||
configuration: None,
|
||||
rpcmethods: HashMap::new(),
|
||||
dynamic: false,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,6 +144,12 @@ where
|
||||
self
|
||||
}
|
||||
|
||||
/// Send true value for "dynamic" field in "getmanifest" response
|
||||
pub fn dynamic(mut self) -> Builder<S, I, O> {
|
||||
self.dynamic = true;
|
||||
self
|
||||
}
|
||||
|
||||
/// Communicate with `lightningd` to tell it about our options,
|
||||
/// RPC methods and subscribe to hooks, and then process the
|
||||
/// initialization, configuring the plugin.
|
||||
@@ -280,6 +288,7 @@ where
|
||||
subscriptions: self.subscriptions.keys().map(|s| s.clone()).collect(),
|
||||
hooks: self.hooks.keys().map(|s| s.clone()).collect(),
|
||||
rpcmethods,
|
||||
dynamic: self.dynamic,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user