From 7f65bc6858b262995a2cd023a6addcc757b78d72 Mon Sep 17 00:00:00 2001 From: Taylor Helsper Date: Wed, 3 Jul 2019 16:24:01 -0500 Subject: [PATCH] Improve LND logging --- rootfs/standard/usr/share/mynode/lnd.conf | 5 ++--- rootfs/standard/var/www/mynode/lightning_info.py | 4 ++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/rootfs/standard/usr/share/mynode/lnd.conf b/rootfs/standard/usr/share/mynode/lnd.conf index aa32852c..6ad65d93 100644 --- a/rootfs/standard/usr/share/mynode/lnd.conf +++ b/rootfs/standard/usr/share/mynode/lnd.conf @@ -2,7 +2,6 @@ # /home/bitcoin/.lnd/lnd.conf [Application Options] -debuglevel=info maxpendingchannels=5 alias=myNode [LND] color=#68F442 @@ -16,8 +15,8 @@ restlisten=0.0.0.0:10080 tlsextraip=0.0.0.0 -#debuglevel=info -debuglevel=debug +debuglevel=info +#debuglevel=debug [Tor] tor.active=true diff --git a/rootfs/standard/var/www/mynode/lightning_info.py b/rootfs/standard/var/www/mynode/lightning_info.py index 9def3fbc..6305b6a2 100644 --- a/rootfs/standard/var/www/mynode/lightning_info.py +++ b/rootfs/standard/var/www/mynode/lightning_info.py @@ -64,6 +64,8 @@ def gen_new_wallet_seed(): return seed def restart_lnd_actual(): + global lnd_ready + lnd_ready = False os.system("systemctl restart lnd") os.system("systemctl restart lnd_unlock") @@ -129,6 +131,8 @@ def get_lnd_status(): height = m.group(1) percent = 100.0 * (float(height) / bitcoin_block_height) return "Syncing... {:.2f}%".format(percent) + elif "Waiting for chain backend to finish sync" in line: + return "Syncing..." elif "Started rescan from block" in line: return "Scanning..." return "Waiting..."