From da74f0118d7368c9f148716a494d71c333323910 Mon Sep 17 00:00:00 2001 From: Simon Vrouwe Date: Wed, 14 Aug 2019 12:28:40 +0300 Subject: [PATCH] lightningd/plugin: at plugin start, set env LIGHTNINGD_VERSION So plugins can know what version they are dealing with. --- lightningd/plugin.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lightningd/plugin.c b/lightningd/plugin.c index 8367b604d..d1a3df9f9 100644 --- a/lightningd/plugin.c +++ b/lightningd/plugin.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -1012,6 +1013,7 @@ void plugins_init(struct plugins *plugins, const char *dev_plugin_debug) path_join(tmpctx, plugins->ld->config_dir, "plugins")); setenv("LIGHTNINGD_PLUGIN", "1", 1); + setenv("LIGHTNINGD_VERSION", version(), 1); /* Spawn the plugin processes before entering the io_loop */ plugins_start(plugins, dev_plugin_debug);