From 7d9e1b5fae649fb26c9757d8aaf3093edd1ecb19 Mon Sep 17 00:00:00 2001 From: Vincenzo Palazzo Date: Thu, 12 Oct 2023 21:23:04 +0200 Subject: [PATCH] lightnind: print the version of cln early MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As a node matures and is no longer new, it can take some time to determine which version of `cln` it's running. To address this, we now display the version earlier. This ensures that even in the event of a crash, we're aware of the running version. (cln-meta-project-py3.11) ➜ lightning git:(macros/log-version) ✗ ./lightningd/lightningd 2023-10-12T19:21:00.899Z INFO lightningd: v23.08.1-209-gae94be4-modded 2023-10-12T19:21:00.994Z INFO lightningd: Creating configuration directory /home/vincent/.lightning/bitcoin 2023-10-12T19:21:01.235Z INFO lightningd: Creating database 2023-10-12T19:21:01.279Z UNUSUAL hsmd: HSM: created new hsm_secret file Could not connect to bitcoind using bitcoin-cli. Is bitcoind running? Make sure you have bitcoind running and that bitcoin-cli is able to connect to bitcoind. You can verify that your Bitcoin Core installation is ready for use by running: $ bitcoin-cli echo 'hello world' 2023-10-12T19:21:01.349Z **BROKEN** plugin-bcli: \nCould not connect to bitcoind using bitcoin-cli. Is bitcoind running?\n\nMake sure you have bitcoind running and that bitcoin-cli is able to connect to bitcoind.\n\nYou can verify that your Bitcoin Core installation is ready for use by running:\n\n $ bitcoin-cli echo 'hello world'\n 2023-10-12T19:21:01.349Z INFO plugin-bcli: Killing plugin: exited before we sent init The Bitcoin backend died. Link: https://github.com/ElementsProject/lightning/issues/6374 Signed-off-by: Vincenzo Palazzo --- lightningd/lightningd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lightningd/lightningd.c b/lightningd/lightningd.c index 64a132566895..71e9b05aaa26 100644 --- a/lightningd/lightningd.c +++ b/lightningd/lightningd.c @@ -1038,6 +1038,7 @@ int main(int argc, char *argv[]) * variables. */ ld = new_lightningd(NULL); ld->state = LD_STATE_INITIALIZING; + log_info(ld->log, "%s", version()); /*~ We store an copy of our arguments before parsing mangles them, so * we can re-exec if versions of subdaemons change. Note the use of