strict YESTERDATE memory
This commit is contained in:
parent
a22517e71d
commit
165742b78e
|
@ -41,7 +41,7 @@ COINS=$($MY_PATH/../tools/COINScheck.sh ${REGIONG1PUB} | tail -n 1)
|
||||||
echo "REGION : ${REGION} (${COINS} G1) WALLET : ${REGIONG1PUB}"
|
echo "REGION : ${REGION} (${COINS} G1) WALLET : ${REGIONG1PUB}"
|
||||||
|
|
||||||
## RETRIEVE FROM REGION UKEY
|
## RETRIEVE FROM REGION UKEY
|
||||||
${MY_PATH}/../tools/timeout.sh -t 20 ${MY_PATH}/../tools/jaklis/jaklis.py history -n 100 -p ${REGIONG1PUB} -j \
|
${MY_PATH}/../tools/timeout.sh -t 20 ${MY_PATH}/../tools/jaklis/jaklis.py history -n 40 -p ${REGIONG1PUB} -j \
|
||||||
> ~/.zen/tmp/${MOATS}/${REGION}.g1history.json
|
> ~/.zen/tmp/${MOATS}/${REGION}.g1history.json
|
||||||
|
|
||||||
## SCAN FOR UPLANET:${SECTOR} in TX
|
## SCAN FOR UPLANET:${SECTOR} in TX
|
||||||
|
@ -50,7 +50,9 @@ if [[ -s ~/.zen/tmp/${MOATS}/${REGION}.g1history.json ]]; then
|
||||||
intercom=$(jq -r '.[] | select(.comment | test("UPLANET:'"${SECTOR}"'")) | .comment' ~/.zen/tmp/${MOATS}/${REGION}.g1history.json | tail -n 1)
|
intercom=$(jq -r '.[] | select(.comment | test("UPLANET:'"${SECTOR}"'")) | .comment' ~/.zen/tmp/${MOATS}/${REGION}.g1history.json | tail -n 1)
|
||||||
ipfs_pop=$(echo "$intercom" | rev | cut -d ':' -f 1 | rev)
|
ipfs_pop=$(echo "$intercom" | rev | cut -d ':' -f 1 | rev)
|
||||||
todate=$(echo "$intercom" | rev | cut -d ':' -f 2 | rev)
|
todate=$(echo "$intercom" | rev | cut -d ':' -f 2 | rev)
|
||||||
echo "SYNC ${SECTOR} <= $todate => $ipfs_pop"
|
echo "SYNC ${SECTOR} <= $todate (=${YESTERDATE})=> $ipfs_pop"
|
||||||
|
|
||||||
|
[[ ${todate} != ${YESTERDATE} ]] && echo "NO GOOD MEMORY - EXIT" && exit 1
|
||||||
|
|
||||||
## TODO: SECURITY PATCH : check payment emitter is from BOOSTRAP
|
## TODO: SECURITY PATCH : check payment emitter is from BOOSTRAP
|
||||||
if [[ $ipfs_pop ]]; then
|
if [[ $ipfs_pop ]]; then
|
||||||
|
|
|
@ -44,7 +44,7 @@ COINS=$($MY_PATH/../tools/COINScheck.sh ${SECTORG1PUB} | tail -n 1)
|
||||||
echo "SECTOR : ${SECTOR} (${COINS} G1) WALLET : ${SECTORG1PUB}"
|
echo "SECTOR : ${SECTOR} (${COINS} G1) WALLET : ${SECTORG1PUB}"
|
||||||
|
|
||||||
## RETRIEVE FROM SECTOR UKEY
|
## RETRIEVE FROM SECTOR UKEY
|
||||||
${MY_PATH}/../tools/timeout.sh -t 20 ${MY_PATH}/../tools/jaklis/jaklis.py history -n 100 -p ${SECTORG1PUB} -j \
|
${MY_PATH}/../tools/timeout.sh -t 20 ${MY_PATH}/../tools/jaklis/jaklis.py history -n 40 -p ${SECTORG1PUB} -j \
|
||||||
> ~/.zen/tmp/${MOATS}/${SECTOR}.g1history.json
|
> ~/.zen/tmp/${MOATS}/${SECTOR}.g1history.json
|
||||||
|
|
||||||
## SCAN FOR UPLANET:${UMAP} in TX
|
## SCAN FOR UPLANET:${UMAP} in TX
|
||||||
|
@ -53,7 +53,9 @@ if [[ -s ~/.zen/tmp/${MOATS}/${SECTOR}.g1history.json ]]; then
|
||||||
intercom=$(jq -r '.[] | select(.comment | test("UPLANET:'"${UMAP}"'")) | .comment' ~/.zen/tmp/${MOATS}/${SECTOR}.g1history.json | tail -n 1)
|
intercom=$(jq -r '.[] | select(.comment | test("UPLANET:'"${UMAP}"'")) | .comment' ~/.zen/tmp/${MOATS}/${SECTOR}.g1history.json | tail -n 1)
|
||||||
ipfs_pop=$(echo "$intercom" | rev | cut -d ':' -f 1 | rev)
|
ipfs_pop=$(echo "$intercom" | rev | cut -d ':' -f 1 | rev)
|
||||||
todate=$(echo "$intercom" | rev | cut -d ':' -f 2 | rev)
|
todate=$(echo "$intercom" | rev | cut -d ':' -f 2 | rev)
|
||||||
echo "SYNC ~/.zen/tmp/${MOATS}/${UMAP} <=> $ipfs_pop"
|
echo "SYNC ${UMAP} <= $todate (=${YESTERDATE})=> $ipfs_pop"
|
||||||
|
|
||||||
|
[[ ${todate} != ${YESTERDATE} ]] && echo "NO GOOD MEMORY - EXIT" && exit 1
|
||||||
|
|
||||||
if [[ $ipfs_pop ]]; then
|
if [[ $ipfs_pop ]]; then
|
||||||
echo "FOUND $todate MEMORY SLOT"
|
echo "FOUND $todate MEMORY SLOT"
|
||||||
|
@ -63,7 +65,6 @@ if [[ -s ~/.zen/tmp/${MOATS}/${SECTOR}.g1history.json ]]; then
|
||||||
## ADD SECURITY : check payment emitter is a "BOOSTRAP" (TODO)
|
## ADD SECURITY : check payment emitter is a "BOOSTRAP" (TODO)
|
||||||
nodeid=$(${MY_PATH}/../tools/g1_to_ipfs.py $g1pub)
|
nodeid=$(${MY_PATH}/../tools/g1_to_ipfs.py $g1pub)
|
||||||
|
|
||||||
|
|
||||||
ipfs --timeout 360s get --progress="false" -o ~/.zen/tmp/${MOATS}/${UMAP} $ipfs_pop \
|
ipfs --timeout 360s get --progress="false" -o ~/.zen/tmp/${MOATS}/${UMAP} $ipfs_pop \
|
||||||
&& ipfs pin rm $ipfs_pop \
|
&& ipfs pin rm $ipfs_pop \
|
||||||
|| echo "$ipfs_pop ERROR ... "
|
|| echo "$ipfs_pop ERROR ... "
|
||||||
|
|
Loading…
Reference in New Issue