mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-24 14:51:03 +01:00
try scanprogress
This commit is contained in:
parent
88edf77ee8
commit
af4b604050
1 changed files with 2 additions and 3 deletions
|
@ -274,15 +274,14 @@ echo "clnActive=${clnRunning}"
|
|||
if [ ${clnRunning} -eq 1 ]; then
|
||||
clnInfo=$(sudo -u bitcoin lightning-cli getinfo)
|
||||
clnBlockHeight=$(echo "${clnInfo}" | jq -r '.blockheight' | tr -cd '[[:digit:]]')
|
||||
echo "clnBlockHeight=${clnBlockHeight}"
|
||||
clnBlockHeightPlusOne=$(expr $clnBlockHeight + 1)
|
||||
echo "clnBlockHeightPlusOne=${clnBlockHeightPlusOne}"
|
||||
echo "total=${total}"
|
||||
if [ "${total}" == "${clnBlockHeight}" ] || [ "${total}" == "${clnBlockHeightPlusOne}" ]; then
|
||||
echo "syncedToChain=1"
|
||||
else
|
||||
echo "syncedToChain=0"
|
||||
fi
|
||||
scanProgress=$(echo "scale=2; $clnBlockHeight*100/$total" | bc)
|
||||
echo "scanProgress=${scanProgress}"
|
||||
fi
|
||||
|
||||
# touchscreen statistics
|
||||
|
|
Loading…
Add table
Reference in a new issue