mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-24 06:48:00 +01:00
fix progress bug
This commit is contained in:
parent
a6e77ea265
commit
9451222773
1 changed files with 3 additions and 0 deletions
|
@ -225,6 +225,9 @@ if [ ${lndRunning} -eq 1 ]; then
|
|||
# calculate LND scan progress by seconds since Genesisblock
|
||||
genesisTimestamp=1230940800
|
||||
nowTimestamp=$(date +%s)
|
||||
if [ ${scanTimestamp} -gt ${nowTimestamp} ]; then
|
||||
scanTimestamp=${nowTimestamp}
|
||||
fi
|
||||
totalSeconds=$(echo "${nowTimestamp}-${genesisTimestamp}" | bc)
|
||||
scannedSeconds=$(echo "${scanTimestamp}-${genesisTimestamp}" | bc)
|
||||
scanProgress=$(echo "scale=2; $scannedSeconds*100/$totalSeconds" | bc)
|
||||
|
|
Loading…
Add table
Reference in a new issue