Adapt compareMass.sh for non cache
This commit is contained in:
parent
d1d99c1655
commit
80a468b537
|
@ -3,7 +3,8 @@ source .env
|
|||
|
||||
day=$1
|
||||
[[ -z $day ]] && day=$(jq .[].date db/daily.json | wc -l)
|
||||
bloc=$(grep -n . db/debug/udblocs | grep -E "^$day:" | cut -d: -f2)
|
||||
#bloc=$(grep -n . db/debug/udblocs | grep -E "^$day:" | cut -d: -f2)
|
||||
bloc=$(curl -s ${DUNITER}/blockchain/with/ud | jq '.result.blocks[]' | grep -n . | grep -E "^$day:" | cut -d: -f2)
|
||||
chainData=$(curl -s ${DUNITER}/blockchain/block/$bloc | jq '.membersCount,.monetaryMass')
|
||||
chainMass=$(tail -n1 <<<"$chainData" | xargs -i echo "scale=2; {}/100" | bc)
|
||||
chainMbr=$(head -n1 <<<"$chainData")
|
||||
|
|
Loading…
Reference in New Issue