fix index status

This commit is contained in:
rootzoll
2020-06-28 14:53:30 +02:00
parent 72d361d9c8
commit 570c977bb8

View File

@@ -47,7 +47,7 @@ if [ "$1" = "status" ]; then
indexInfo="OK"
else
echo "isIndexed=0"
if [ ${#indexedToBlock} -gt 0 ]; then
if [ ${#indexedToBlock} -gt 0 ] && [ ${#blockchainHeight} -gt 0 ]; then
progressPercent=$(printf %.2f $(echo "${indexedToBlock}/${blockchainHeight}*100" | bc -l))
indexInfo="Indexing is at ${progressPercent}% (please wait)"
else