mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-19 04:00:34 +02:00
try scanprogress
This commit is contained in:
@@ -274,15 +274,14 @@ echo "clnActive=${clnRunning}"
|
|||||||
if [ ${clnRunning} -eq 1 ]; then
|
if [ ${clnRunning} -eq 1 ]; then
|
||||||
clnInfo=$(sudo -u bitcoin lightning-cli getinfo)
|
clnInfo=$(sudo -u bitcoin lightning-cli getinfo)
|
||||||
clnBlockHeight=$(echo "${clnInfo}" | jq -r '.blockheight' | tr -cd '[[:digit:]]')
|
clnBlockHeight=$(echo "${clnInfo}" | jq -r '.blockheight' | tr -cd '[[:digit:]]')
|
||||||
echo "clnBlockHeight=${clnBlockHeight}"
|
|
||||||
clnBlockHeightPlusOne=$(expr $clnBlockHeight + 1)
|
clnBlockHeightPlusOne=$(expr $clnBlockHeight + 1)
|
||||||
echo "clnBlockHeightPlusOne=${clnBlockHeightPlusOne}"
|
|
||||||
echo "total=${total}"
|
|
||||||
if [ "${total}" == "${clnBlockHeight}" ] || [ "${total}" == "${clnBlockHeightPlusOne}" ]; then
|
if [ "${total}" == "${clnBlockHeight}" ] || [ "${total}" == "${clnBlockHeightPlusOne}" ]; then
|
||||||
echo "syncedToChain=1"
|
echo "syncedToChain=1"
|
||||||
else
|
else
|
||||||
echo "syncedToChain=0"
|
echo "syncedToChain=0"
|
||||||
fi
|
fi
|
||||||
|
scanProgress=$(echo "scale=2; $clnBlockHeight*100/$total" | bc)
|
||||||
|
echo "scanProgress=${scanProgress}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# touchscreen statistics
|
# touchscreen statistics
|
||||||
|
Reference in New Issue
Block a user