From 00a60a3608210de7e6dc1c4f73b03634a668f5dd Mon Sep 17 00:00:00 2001 From: Tony Aldon Date: Tue, 10 Oct 2023 11:00:21 +0200 Subject: [PATCH] cln-grpc: do not generate cerficates when no autostart. Changelog-None --- plugins/grpc-plugin/src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/grpc-plugin/src/main.rs b/plugins/grpc-plugin/src/main.rs index 926f7cefb612..782752c22166 100644 --- a/plugins/grpc-plugin/src/main.rs +++ b/plugins/grpc-plugin/src/main.rs @@ -20,7 +20,6 @@ async fn main() -> Result<()> { let path = Path::new("lightning-rpc"); let directory = std::env::current_dir()?; - let (identity, ca_cert) = tls::init(&directory)?; let plugin = match Builder::new(tokio::io::stdin(), tokio::io::stdout()) .option(options::ConfigOption::new( @@ -48,6 +47,8 @@ async fn main() -> Result<()> { Some(o) => return Err(anyhow!("grpc-port is not a valid integer: {:?}", o)), }; + let (identity, ca_cert) = tls::init(&directory)?; + let state = PluginState { rpc_path: path.into(), identity,