From 0a1c490e8707496ffada15a16ecbcd976eef23ba Mon Sep 17 00:00:00 2001 From: squidbear <379651+czarly@users.noreply.github.com> Date: Mon, 31 Mar 2025 12:58:11 +0200 Subject: [PATCH] fix for tron --- check-health.sh | 4 ++-- sync-status.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/check-health.sh b/check-health.sh index 610885f9..404ff9ac 100755 --- a/check-health.sh +++ b/check-health.sh @@ -23,7 +23,7 @@ timeout=3 # seconds response_file=$(mktemp) -http_status_code=$(curl --ipv4 -m $timeout -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 -L --ipv4 -m $timeout -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) if [ $? -eq 0 ]; then if [[ $http_status_code -eq 200 ]]; then @@ -65,7 +65,7 @@ if [ $? -eq 0 ]; then status_file4=$(mktemp) { - curl --ipv4 -m $timeout -s -X POST -w "%{http_code} %{time_total}" -o "$response_file4" -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest", false],"id":1}' $RPC_URL > "$status_file4" + curl -L --ipv4 -m $timeout -s -X POST -w "%{http_code} %{time_total}" -o "$response_file4" -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest", false],"id":1}' $RPC_URL > "$status_file4" } & pid4=$! diff --git a/sync-status.sh b/sync-status.sh index 5b5433a7..87dfeb77 100755 --- a/sync-status.sh +++ b/sync-status.sh @@ -33,7 +33,7 @@ for path in $pathlist; do if [ -n "$2" ]; then ref="$2" else - chain_id_response=$(curl --ipv4 -m 1 -s -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' $RPC_URL) + chain_id_response=$(curl -L --ipv4 -m 1 -s -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' $RPC_URL) if [ $? -eq 0 ]; then chain_id=$(echo "$chain_id_response" | jq -r '.result' 2>/dev/null)