This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Note that it seems like the explorer is load balanced across multiple nodes, as sometimes a call will show that | |
# you are ahead by a few blocks, but an immediate subsequent call will show you are in sync. | |
# Add this to your .bash_profile | |
function delta2() { | |
# Kudos to @pheelLikeWater for original version of this! | |
lastBlockHash=`stats | head -n 6 | tail -n 1 | awk '{print $2}'` | |
lastBlockCount=`stats | head -n 7 | tail -n 1 | awk '{print $2}' | tr -d \"` | |
shelleyExplorerJson=`curl -X POST -H "Content-Type: application/json" --data '{"query":" query { allBlocks (last: 1) { pageInfo { hasNextPage hasPreviousPage startCursor endCursor } totalCount edges { node { id date { slot epoch { id firstBlock { id } lastBlock { id } totalBlocks } } transactions { totalCount edges { node { id block { id date { slot epoch { id firstBlock { id } lastBlock { id } |