cln-grpc: Add midstate between configuration and replying to init

This is a bit special, in that it allows us to configure the plugin,
but then still abort startup by sending `init` with the `disable` flag
set.
This commit is contained in:
Christian Decker
2022-04-08 05:41:12 +02:00
committed by Rusty Russell
parent 9826402c99
commit 8717c4e5a2
4 changed files with 143 additions and 60 deletions

View File

@@ -132,6 +132,9 @@ pub(crate) struct GetManifestResponse {
}
#[derive(Serialize, Default, Debug)]
pub struct InitResponse {}
pub struct InitResponse {
#[serde(skip_serializing_if = "Option::is_none")]
pub disable: Option<String>,
}
pub trait Response: Serialize + Debug {}