TODO: SECURITY PATCH : check payment emitter is from BOOSTRAP
This commit is contained in:
parent
0914213adb
commit
308a60b2e4
|
@ -52,6 +52,7 @@ if [[ -s ~/.zen/tmp/${MOATS}/${REGION}.g1history.json ]]; then
|
||||||
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 => $ipfs_pop"
|
||||||
|
|
||||||
|
## TODO: SECURITY PATCH : check payment emitter is from BOOSTRAP
|
||||||
if [[ $ipfs_pop ]]; then
|
if [[ $ipfs_pop ]]; then
|
||||||
g1pub=$(jq -r '.[] | select(.comment | test("UPLANET:'"${SECTOR}"'")) | .pubkey' ~/.zen/tmp/${MOATS}/${REGION}.g1history.json | tail -n 1)
|
g1pub=$(jq -r '.[] | select(.comment | test("UPLANET:'"${SECTOR}"'")) | .pubkey' ~/.zen/tmp/${MOATS}/${REGION}.g1history.json | tail -n 1)
|
||||||
echo "INFO :: $g1pub Memory updater"
|
echo "INFO :: $g1pub Memory updater"
|
||||||
|
|
|
@ -55,11 +55,11 @@ if [[ -s ~/.zen/tmp/${MOATS}/${SECTOR}.g1history.json ]]; then
|
||||||
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 ~/.zen/tmp/${MOATS}/${UMAP} <=> $ipfs_pop"
|
||||||
|
|
||||||
## TODO: SECURITY PATCH : check payment emitter is UMAPG1PUB
|
## TODO: SECURITY PATCH : check payment emitter is from BOOSTRAP
|
||||||
if [[ $ipfs_pop ]]; then
|
if [[ $ipfs_pop ]]; then
|
||||||
echo "FOUND $todate MEMORY SLOT"
|
echo "FOUND $todate MEMORY SLOT"
|
||||||
g1pub=$(jq -r '.[] | select(.comment | test("UPLANET:'"${UMAP}"'")) | .pubkey' ~/.zen/tmp/${MOATS}/${SECTOR}.g1history.json | tail -n 1)
|
g1pub=$(jq -r '.[] | select(.comment | test("UPLANET:'"${UMAP}"'")) | .pubkey' ~/.zen/tmp/${MOATS}/${SECTOR}.g1history.json | tail -n 1)
|
||||||
[[ "$g1pub" != "$G1PUB" ]] && echo "INFO :: $g1pub Memory updater"
|
echo "INFO :: $g1pub Memory updater"
|
||||||
ipfs --timeout 180s get -o ~/.zen/tmp/${MOATS}/${UMAP} $ipfs_pop \
|
ipfs --timeout 180s get -o ~/.zen/tmp/${MOATS}/${UMAP} $ipfs_pop \
|
||||||
|| echo "$ipfs_pop ERROR ... "
|
|| echo "$ipfs_pop ERROR ... "
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue