From 6d187782861135724f0102efcd2ee3aa5cd081a2 Mon Sep 17 00:00:00 2001 From: Sebastian <379651+czarly@users.noreply.github.com> Date: Mon, 18 Mar 2024 16:50:15 +0100 Subject: [PATCH] fix --- sync-status.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sync-status.sh b/sync-status.sh index 15558f54..ac4f7e76 100755 --- a/sync-status.sh +++ b/sync-status.sh @@ -50,7 +50,7 @@ for path in $pathlist; do latest_block_hash=$(echo "$response" | jq -r '.result.hash') response_file2=$(mktemp) - http_status_code2=$(curl --ipv4 -m 1 -s -X POST -w "%{http_code}" -o "$response_file" -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["$latest_block_number", false],"id":1}' $ref) + http_status_code2=$(curl --ipv4 -m 1 -s -X POST -w "%{http_code}" -o "$response_file2" -H "Content-Type: application/json" --data "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockByNumber\",\"params\":[\"$latest_block_number\", false],\"id\":1}" $ref) if [ $? -eq 0 ]; then if [[ $http_status_code2 -eq 200 ]]; then response2=$(cat "$response_file2") @@ -61,7 +61,7 @@ for path in $pathlist; do if [ "$latest_block_hash" == "$latest_block_hash2" ]; then response_file3=$(mktemp) - http_status_code=$(curl --ipv4 -m 1 -s -X POST -w "%{http_code}" -o "$response_file" -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest", false],"id":1}' $RPC_URL) + http_status_code=$(curl --ipv4 -m 1 -s -X POST -w "%{http_code}" -o "$response_file3" -H "Content-Type: application/json" --data "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockByNumber\",\"params\":[\"latest\", false],\"id\":1}" $RPC_URL) if [ $? -eq 0 ]; then if [[ $http_status_code -eq 200 ]]; then