From 9e912f85666a7ec8929544342e6952e58b1352a0 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Tue, 21 Jun 2022 17:11:07 +0200 Subject: [PATCH] cln-plugin: Make the proxy-related configuration Option<> These are only populated if a proxy was specified, see lightningd/plugin.c:1855, so we were getting upset when we expected them and they weren't set. --- plugins/src/messages.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/src/messages.rs b/plugins/src/messages.rs index bdd80ce320eb..90be18872551 100644 --- a/plugins/src/messages.rs +++ b/plugins/src/messages.rs @@ -75,10 +75,13 @@ pub struct Configuration { pub startup: bool, pub network: String, pub feature_set: HashMap, - pub proxy: ProxyInfo, + + // The proxy related options are only populated if a proxy was + // configured. + pub proxy: Option, #[serde(rename = "torv3-enabled")] - pub torv3_enabled: bool, - pub always_use_proxy: bool, + pub torv3_enabled: Option, + pub always_use_proxy: Option, } #[derive(Clone, Debug, Deserialize)]