op/geth/fraxtal-mainnet: fix EL peer injection method — change from admin_addStaticPeer to admin_addPeer for op-geth clients
This commit is contained in:
@@ -323,7 +323,9 @@ detect_client_type() {
|
||||
local node_name="$1"
|
||||
local name_lower=$(echo "$node_name" | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
if [[ "$name_lower" == *"geth"* ]]; then
|
||||
if [[ "$name_lower" == *"op-geth"* ]]; then
|
||||
echo "op-geth"
|
||||
elif [[ "$name_lower" == *"geth"* ]]; then
|
||||
echo "geth"
|
||||
elif [[ "$name_lower" == *"reth"* ]]; then
|
||||
echo "reth"
|
||||
@@ -351,7 +353,7 @@ add_static_peer() {
|
||||
# Geth supports admin_addStaticPeer
|
||||
method="admin_addStaticPeer"
|
||||
else
|
||||
# Reth and most other clients use admin_addPeer
|
||||
# Reth, op-geth, and most other clients use admin_addPeer
|
||||
method="admin_addPeer"
|
||||
fi
|
||||
|
||||
|
||||
@@ -82,6 +82,7 @@ PEER_COUNT="$(echo "$PEERS_JSON" | jq -r '.result | length' 2>/dev/null || echo
|
||||
NAME_LC="$(echo "$CLIENT_NAME" | tr '[:upper:]' '[:lower:]')"
|
||||
CLIENT_TYPE="unknown"
|
||||
case "$NAME_LC" in
|
||||
*op-geth*) CLIENT_TYPE="op-geth" ;;
|
||||
*geth*) CLIENT_TYPE="geth" ;;
|
||||
*reth*) CLIENT_TYPE="reth" ;;
|
||||
*erigon*) CLIENT_TYPE="erigon" ;;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
# peer-reinject.sh — generic .after-start hook: re-seed peers from peer-capture state.
|
||||
# Uses admin_addStaticPeer for geth, admin_addPeer otherwise (connect-peers.sh).
|
||||
# Uses admin_addStaticPeer for geth, admin_addPeer for op-geth and others (connect-peers.sh).
|
||||
# In-network vantage (rpc_chains). Idempotent; best-effort (never fails the restart).
|
||||
#
|
||||
# Seed order (one path for us and customers):
|
||||
|
||||
Reference in New Issue
Block a user