mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-10-09 20:32:52 +02:00
Try to move chain sync into lnd scan
This commit is contained in:
@@ -19,34 +19,34 @@ fi
|
|||||||
echo "OK - ${network}d is running"
|
echo "OK - ${network}d is running"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
###### Wait for Blochain Sync
|
###### Wait for Blochain Sync --> LET DO THIS LATER ON LND SCAN
|
||||||
echo "*** Syncing Blockchain ***"
|
#echo "*** Syncing Blockchain ***"
|
||||||
ready=0
|
#ready=0
|
||||||
while [ ${ready} -eq 0 ]
|
#while [ ${ready} -eq 0 ]
|
||||||
do
|
# do
|
||||||
progress="$(sudo -u bitcoin ${network}-cli getblockchaininfo | jq -r '.verificationprogress')"
|
# progress="$(sudo -u bitcoin ${network}-cli getblockchaininfo | jq -r '.verificationprogress')"
|
||||||
verySmallProgress=$(echo $progress | grep -c 'e-');
|
# verySmallProgress=$(echo $progress | grep -c 'e-');
|
||||||
if [ ${verySmallProgress} -eq 1 ]; then
|
# if [ ${verySmallProgress} -eq 1 ]; then
|
||||||
progress="0.00";
|
# progress="0.00";
|
||||||
fi
|
# fi
|
||||||
ready=$(echo $progress'>0.99' | bc -l)
|
# ready=$(echo $progress'>0.99' | bc -l)
|
||||||
sync_percentage=$(printf "%.2f%%" "$(echo $progress | awk '{print 100 * $1}')")
|
# sync_percentage=$(printf "%.2f%%" "$(echo $progress | awk '{print 100 * $1}')")
|
||||||
#echo "progress($progress) verySmallProgress($verySmallProgress) ready($ready) sync_percentage($sync_percentage)"
|
# #echo "progress($progress) verySmallProgress($verySmallProgress) ready($ready) sync_percentage($sync_percentage)"
|
||||||
if [ ${#ready} -eq 0 ]; then
|
# if [ ${#ready} -eq 0 ]; then
|
||||||
echo "waiting for init ... can take a while"
|
# echo "waiting for init ... can take a while"
|
||||||
ready=0
|
# ready=0
|
||||||
elif [ "$sync_percentage" = "0.00%" ]; then
|
# elif [ "$sync_percentage" = "0.00%" ]; then
|
||||||
echo "waiting for network ... can take a while"
|
# echo "waiting for network ... can take a while"
|
||||||
ready=0
|
# ready=0
|
||||||
elif [ ${ready} -eq 0 ]; then
|
# elif [ ${ready} -eq 0 ]; then
|
||||||
echo "${sync_percentage}"
|
# echo "${sync_percentage}"
|
||||||
else
|
# else
|
||||||
echo "finishing sync ... can take a while"
|
# echo "finishing sync ... can take a while"
|
||||||
fi
|
# fi
|
||||||
sleep 3
|
# sleep 3
|
||||||
done
|
# done
|
||||||
echo "OK - Blockchain is synced"
|
#echo "OK - Blockchain is synced"
|
||||||
echo ""
|
#echo ""
|
||||||
|
|
||||||
###### LND Config
|
###### LND Config
|
||||||
echo "*** LND Config ***"
|
echo "*** LND Config ***"
|
||||||
|
Reference in New Issue
Block a user