From ad0996f7031b9000b71d6664aef9609d2bf64b89 Mon Sep 17 00:00:00 2001 From: /rootzoll Date: Sat, 30 Nov 2024 11:37:05 +0100 Subject: [PATCH] Fix #4834 Core Lightning Peercount (#4846) --- home.admin/config.scripts/cl.monitor.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/home.admin/config.scripts/cl.monitor.sh b/home.admin/config.scripts/cl.monitor.sh index ffb057684..cd09bbf82 100755 --- a/home.admin/config.scripts/cl.monitor.sh +++ b/home.admin/config.scripts/cl.monitor.sh @@ -185,8 +185,8 @@ if [ "$2" = "info" ]; then cl_address="${pubkey}@${address}:${port}" cl_tor=$(echo "${cl_address}" | grep -c ".onion") cl_channels_pending=$(echo "${ln_getInfo}" | jq -r '.num_pending_channels') - cl_channels_active=$(echo "${ln_listpeers}" | jq -r '[.peers[] | select(.connected == true)] | length') - cl_channels_inactive=$(echo "${ln_listpeers}" | jq -r '[.peers[] | select(.connected == false)] | length') + cl_channels_active=$(echo "${ln_getInfo}" | jq -r '.num_active_channels') + cl_channels_inactive=$(echo "${ln_getInfo}" | jq -r '.num_inactive_channels') cl_channels_total=$((cl_channels_active + cl_channels_inactive)) cl_peers=$(echo "${ln_getInfo}" | jq -r '.num_peers') cl_fees_collected_msat=$(echo "${ln_getInfo}" | jq -r '.fees_collected_msat')