even better

This commit is contained in:
Sebastian
2024-12-13 10:02:29 +01:00
parent 7793a32a0d
commit 381159a0d7

View File

@@ -25,5 +25,9 @@ for path in $pathlist; do
RPC_URL="https://$DOMAIN$path" RPC_URL="https://$DOMAIN$path"
curl -s -X POST $RPC_URL -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest",false],"id":1}' | jq -r '.result.number, .result.hash' | awk '{if (NR==1) print "Block Number:", strtonum($0); else print "Block Hash:", $0}' curl -s -X POST $RPC_URL -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest",false],"id":1}' | jq -r '.result.number, .result.hash' | awk '{if (NR==1) print "Block Number:", strtonum($0); else print "Block Hash:", $0}'
if $? -ne 0; then
curl -s -X POST $RPC_URL -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest",false],"id":1}' | jq
fi
fi fi
done done