mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-28 12:36:27 +02:00
detect scan height better
This commit is contained in:
@@ -171,12 +171,8 @@ else
|
||||
ln_alias=$(echo "${ln_getInfo}" | grep "alias" | cut -d '"' -f4)
|
||||
ln_sync=$(echo "${ln_getInfo}" | grep "synced_to_chain" | grep "true" -c)
|
||||
if [ ${ln_sync} -eq 0 ]; then
|
||||
item=$(sudo -u bitcoin tail -n 100 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log | grep height | tail -n1 | awk '{print $9} {print $10} {print $11} {print $12}' | tr -dc '0-9')
|
||||
item=$(sudo -u bitcoin tail -n 100 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log | grep "(height" | tail -n1 | awk '{print $9} {print $10} {print $11} {print $12}' | tr -dc '0-9')
|
||||
total=$(sudo -u bitcoin ${network}-cli -datadir=/home/bitcoin/.${network} getblockchaininfo | jq -r '.blocks')
|
||||
checkItem=$(echo "${item}" | grep '000' -c)
|
||||
if [ ${checkItem} -eq 0 ]; then
|
||||
item="?"
|
||||
fi
|
||||
ln_baseInfo="${color_red} waiting for chain sync"
|
||||
ln_channelInfo="${item}/${total}"
|
||||
else
|
||||
|
@@ -7,9 +7,9 @@ localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1
|
||||
# parse the actual scanned height progress from LND logs
|
||||
item=0
|
||||
chain="$(sudo -u bitcoin ${network}-cli -datadir=/home/bitcoin/.${network} getblockchaininfo | jq -r '.chain')"
|
||||
gotData=$(sudo -u bitcoin tail -n 100 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log | grep -c height)
|
||||
gotData=$(sudo -u bitcoin tail -n 100 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log | grep -c "(height")
|
||||
if [ ${gotData} -gt 0 ]; then
|
||||
item=$(sudo -u bitcoin tail -n 100 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log | grep height | tail -n1 | awk '{print $9} {print $10} {print $11} {print $12}' | tr -dc '0-9')
|
||||
item=$(sudo -u bitcoin tail -n 100 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log | grep "(height" | tail -n1 | awk '{print $9} {print $10} {print $11} {print $12}' | tr -dc '0-9')
|
||||
fi
|
||||
|
||||
# get total number of blocks
|
||||
|
Reference in New Issue
Block a user