2019-05-27 10:33:22 -07:00
|
|
|
#!/bin/sh
|
|
|
|
|
# this super hack will sync the explorer within the specified block height range
|
|
|
|
|
forcesync() {
|
|
|
|
|
blockcount=$1
|
|
|
|
|
echo "╒══════════════════<<"
|
|
|
|
|
echo "| height : $blockcount"
|
|
|
|
|
blockhash=`curl -s https://explorer.exor.io/api/getblockhash?height=$blockcount`
|
|
|
|
|
echo "| ଓ hash : $blockhash"
|
|
|
|
|
curl -s https://explorer.exor.io/block/$blockhash > /dev/null
|
|
|
|
|
echo "╘═══════════════════════════════>>"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
main() {
|
|
|
|
|
if [ $currentblockcount -ne $endingblockcount ]; then
|
|
|
|
|
forcesync $currentblockcount
|
|
|
|
|
currentblockcount=$((currentblockcount + 1))
|
2021-03-17 17:54:09 -06:00
|
|
|
else
|
|
|
|
|
exit;
|
|
|
|
|
fi
|
2019-05-27 10:33:22 -07:00
|
|
|
main
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
startingblockcount=1213133
|
|
|
|
|
endingblockcount=1213143
|
|
|
|
|
echo "Syncing..."
|
|
|
|
|
currentblockcount=$startingblockcount
|
2021-03-17 17:54:09 -06:00
|
|
|
main
|