Start default compareMass to last day

This commit is contained in:
poka 2020-09-24 03:46:41 +02:00
parent 127c4d5a67
commit 247be16ff4
1 changed files with 2 additions and 1 deletions

View File

@ -2,7 +2,7 @@
source .env
day=$1
[[ -z $day ]] && day=1
[[ -z $day ]] && day=$(jq .[].date db/daily.json | wc -l)
bloc=$(grep -n . db/debug/udblocs | 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)
@ -20,3 +20,4 @@ json : $jsonMbr - $jsonMass
chain: $chainMbr - $chainMass
"
#fi