From 1f04e7d85d87b263d3f34a886f54d85d8ae87a50 Mon Sep 17 00:00:00 2001 From: Taylor Helsper Date: Thu, 20 Aug 2020 19:56:31 -0500 Subject: [PATCH] Upgrade LND to v0.11.0 --- rootfs/standard/usr/bin/mynode_post_upgrade.sh | 2 +- rootfs/standard/var/www/mynode/lightning_info.py | 7 +++++++ rootfs/standard/var/www/mynode/lnd.py | 3 +++ rootfs/standard/var/www/mynode/templates/lnd.html | 6 +++++- setup/setup_device.sh | 2 +- 5 files changed, 17 insertions(+), 3 deletions(-) diff --git a/rootfs/standard/usr/bin/mynode_post_upgrade.sh b/rootfs/standard/usr/bin/mynode_post_upgrade.sh index 9b364c7f..dfb15b24 100755 --- a/rootfs/standard/usr/bin/mynode_post_upgrade.sh +++ b/rootfs/standard/usr/bin/mynode_post_upgrade.sh @@ -198,7 +198,7 @@ fi # Upgrade LND echo "Upgrading LND..." -LND_VERSION="v0.10.3-beta" +LND_VERSION="v0.11.0-beta" LND_ARCH="lnd-linux-armv7" if [ $IS_X86 = 1 ]; then LND_ARCH="lnd-linux-amd64" diff --git a/rootfs/standard/var/www/mynode/lightning_info.py b/rootfs/standard/var/www/mynode/lightning_info.py index 2b3f43bf..66c5e047 100644 --- a/rootfs/standard/var/www/mynode/lightning_info.py +++ b/rootfs/standard/var/www/mynode/lightning_info.py @@ -12,6 +12,7 @@ from device_info import get_journalctl_log lightning_info = None lnd_ready = False lnd_version = None +loopd_version = None lightning_peers = None lightning_channels = None lightning_channel_balance = None @@ -214,6 +215,12 @@ def get_lnd_version(): lnd_version = subprocess.check_output("lnd --version | egrep -o '[0-9]+\\.[0-9]+\\.[0-9]+' | head -n 1", shell=True) return lnd_version +def get_loopd_version(): + global loopd_version + if loopd_version == None: + loopd_version = subprocess.check_output("loopd --version | egrep -o '[0-9]+\\.[0-9]+\\.[0-9]+' | head -n 1", shell=True) + return loopd_version + def get_default_lnd_config(): try: with open("/usr/share/mynode/lnd.conf") as f: diff --git a/rootfs/standard/var/www/mynode/lnd.py b/rootfs/standard/var/www/mynode/lnd.py index 49301029..d189cbe1 100644 --- a/rootfs/standard/var/www/mynode/lnd.py +++ b/rootfs/standard/var/www/mynode/lnd.py @@ -67,6 +67,7 @@ def page_lnd(): "wallet_exists": wallet_exists, "wallet_logged_in": wallet_logged_in, "version": get_lnd_version(), + "loopd_version": get_loopd_version(), "status": status, "ui_settings": read_ui_settings() } @@ -80,6 +81,7 @@ def page_lnd(): "alias": alias, "status": get_lnd_status(), "version": get_lnd_version(), + "loopd_version": get_loopd_version(), "ui_settings": read_ui_settings() } return render_template('lnd.html', **templateData) @@ -159,6 +161,7 @@ def page_lnd(): "wallet_exists": wallet_exists, "wallet_logged_in": wallet_logged_in, "version": get_lnd_version(), + "loopd_version": get_loopd_version(), "channel_backup_exists": channel_backup_exists, "status": status, "height": height, diff --git a/rootfs/standard/var/www/mynode/templates/lnd.html b/rootfs/standard/var/www/mynode/templates/lnd.html index 1c90fef1..044b5953 100644 --- a/rootfs/standard/var/www/mynode/templates/lnd.html +++ b/rootfs/standard/var/www/mynode/templates/lnd.html @@ -130,9 +130,13 @@
{{num_peers}}
-
Version
+
LND Version
{{version}}
+
+
Loop Version
+
{{loopd_version}}
+
{% endif %} diff --git a/setup/setup_device.sh b/setup/setup_device.sh index b4667ee1..1bf8defd 100755 --- a/setup/setup_device.sh +++ b/setup/setup_device.sh @@ -289,7 +289,7 @@ fi cd ~ # Install Lightning -LND_VERSION="v0.10.3-beta" +LND_VERSION="v0.11.0-beta" LND_ARCH="lnd-linux-armv7" if [ $IS_X86 = 1 ]; then LND_ARCH="lnd-linux-amd64"