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