From dd18b750fe6963972a138dad05eaabfc17f1f7d0 Mon Sep 17 00:00:00 2001 From: goldsquid Date: Thu, 18 Dec 2025 08:49:54 +0700 Subject: [PATCH] ipv4 --- clone-peers.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clone-peers.sh b/clone-peers.sh index 5ff984fe..05e56bed 100755 --- a/clone-peers.sh +++ b/clone-peers.sh @@ -119,7 +119,7 @@ echo "" # Run the command to get the list of enode strings from source echo "Fetching peers from source node..." echo "DEBUG: Executing: curl -X POST -H \"Content-Type: application/json\" --data '{\"jsonrpc\":\"2.0\",\"method\":\"admin_peers\",\"params\":[],\"id\":1}' \"$SOURCE_URL\"" -enodes=$(curl -X POST -H "Content-Type: application/json" --silent --data "{\"jsonrpc\":\"2.0\",\"method\":\"admin_peers\",\"params\":[],\"id\":1}" "$SOURCE_URL" | jq -r '.result[].enode' 2>/dev/null) +enodes=$(curl --ipv4 -X POST -H "Content-Type: application/json" --silent --data "{\"jsonrpc\":\"2.0\",\"method\":\"admin_peers\",\"params\":[],\"id\":1}" "$SOURCE_URL" | jq -r '.result[].enode' 2>/dev/null) # Check if the command was successful if [ $? -ne 0 ] || [ -z "$enodes" ]; then @@ -147,7 +147,7 @@ while IFS= read -r enode; do continue fi echo "DEBUG: Executing: curl -X POST -H \"Content-Type: application/json\" --data '{\"jsonrpc\":\"2.0\",\"method\":\"admin_addPeer\",\"params\":[\"${enode}\"],\"id\":1}' \"$TARGET_URL\"" - result=$(curl -X POST -H "Content-Type: application/json" --silent --data "{\"jsonrpc\":\"2.0\",\"method\":\"admin_addPeer\",\"params\":[\"${enode}\"],\"id\":1}" "$TARGET_URL" | jq -r '.result' 2>/dev/null) + result=$(curl --ipv4 -X POST -H "Content-Type: application/json" --silent --data "{\"jsonrpc\":\"2.0\",\"method\":\"admin_addPeer\",\"params\":[\"${enode}\"],\"id\":1}" "$TARGET_URL" | jq -r '.result' 2>/dev/null) if [ "$result" = "true" ] || [ "$result" = "null" ]; then echo " ✓ Success"