Improve cleaning text for progress view
This commit is contained in:
parent
7a4b368786
commit
d69b60e362
|
@ -26,12 +26,15 @@ if $debug; then
|
||||||
TXBLOCKS=$(cat $SCRIPTPATH/db/debug/txblocs)
|
TXBLOCKS=$(cat $SCRIPTPATH/db/debug/txblocs)
|
||||||
membresPubkeys=$(cat $SCRIPTPATH/db/debug/membresPubkeys)
|
membresPubkeys=$(cat $SCRIPTPATH/db/debug/membresPubkeys)
|
||||||
udBlocs=$(cat $SCRIPTPATH/db/debug/udblocs)
|
udBlocs=$(cat $SCRIPTPATH/db/debug/udblocs)
|
||||||
|
echo # To clean next progress view
|
||||||
else
|
else
|
||||||
TXBLOCKS=$(curl -s ${DUNITER}/blockchain/with/tx | jq '.result.blocks[]')
|
TXBLOCKS=$(curl -s ${DUNITER}/blockchain/with/tx | jq '.result.blocks[]')
|
||||||
echo "TXBLOCKS OK"
|
echo "TXBLOCKS OK"
|
||||||
membresPubkeys=$(curl -s ${DUNITER}/wot/members | jq -r '.results[].pubkey')
|
membresPubkeys=$(curl -s ${DUNITER}/wot/members | jq -r '.results[].pubkey')
|
||||||
|
tput cuu1;tput el;
|
||||||
echo "membresPubkeys OK"
|
echo "membresPubkeys OK"
|
||||||
udBlocs=$(curl -s ${DUNITER}/blockchain/with/ud | jq '.result.blocks[]')
|
udBlocs=$(curl -s ${DUNITER}/blockchain/with/ud | jq '.result.blocks[]')
|
||||||
|
tput cuu1;tput el;
|
||||||
echo "udBlocs OK"
|
echo "udBlocs OK"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,6 @@ scanTxWallets() {
|
||||||
bloc=${TXBLOCKS[$i]}
|
bloc=${TXBLOCKS[$i]}
|
||||||
[[ -z $bloc ]] && break
|
[[ -z $bloc ]] && break
|
||||||
# [[ $i -lt 290 ]] && continue #kopa
|
# [[ $i -lt 290 ]] && continue #kopa
|
||||||
sleep 0.05
|
|
||||||
|
|
||||||
# Récupère la date et l'objet transaction du bloc courant
|
# Récupère la date et l'objet transaction du bloc courant
|
||||||
blocFull=$(curl -s ${DUNITER}/blockchain/block/$bloc)
|
blocFull=$(curl -s ${DUNITER}/blockchain/block/$bloc)
|
||||||
|
@ -203,14 +202,13 @@ scanTxWallets() {
|
||||||
midTimeExec=$(echo "scale=3; $midTimeExecCum/$incExec" | bc)
|
midTimeExec=$(echo "scale=3; $midTimeExecCum/$incExec" | bc)
|
||||||
((incExec++))
|
((incExec++))
|
||||||
if [[ $isWeb != "web" ]]; then
|
if [[ $isWeb != "web" ]]; then
|
||||||
clear
|
tput cuu1;tput el;tput cuu1;tput el;tput cuu1;tput el;tput cuu1;tput el;tput cuu1;tput el; # Clear the last view
|
||||||
echo "Heure de début: $startTime"
|
echo -e "Heure de début: $startTime\n
|
||||||
echo
|
\rScan en cours: $progress% - $bloc/$lastBloc (Boucle $i)
|
||||||
echo "Scan en cours: $progress% - $bloc/$lastBloc (Boucle $i)"
|
\rDate: $blockDate
|
||||||
echo "Date: $blockDate"
|
\rTemps d'execution: $midTimeExec"
|
||||||
echo "Temps d'execution: $midTimeExec"
|
|
||||||
else
|
else
|
||||||
echo "Scan des blocs avec transactions en cours ..."
|
[[ -z $firstScan ]] && echo "Scan des blocs avec transactions en cours ..." && firstScan=true
|
||||||
fi
|
fi
|
||||||
# [[ $i -ge 35949 ]] && break #kopa
|
# [[ $i -ge 35949 ]] && break #kopa
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue