fix: correct chain ID parsing regex in sync verification
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 4s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 3s
P2P Network Verification / p2p-verification (push) Successful in 3s

- Fix regex to extract actual chain ID value from supported_chains array
- Previously extracted 'supported_chains' field name instead of value
- Now correctly extracts chain ID from ["ait-devnet"] format
This commit is contained in:
aitbc
2026-04-20 20:35:18 +02:00
parent 9bc9cdefc8
commit 6db8628c26

View File

@@ -72,7 +72,7 @@ get_chain_id() {
local node_ip="$1" local node_ip="$1"
# Get chain ID from /health endpoint # Get chain ID from /health endpoint
chain_id=$(curl -s --max-time 5 "http://${node_ip}:${RPC_PORT}/health" 2>/dev/null | grep -o '"supported_chains":\["[^"]*"\]' | grep -o '"[^"]*"' | head -1 | tr -d '"' || echo "") chain_id=$(curl -s --max-time 5 "http://${node_ip}:${RPC_PORT}/health" 2>/dev/null | grep -o '"supported_chains":\["[^"]*"\]' | grep -o '\["[^"]*"\]' | grep -o '[^"\[\]]*' || echo "")
if [ -z "$chain_id" ]; then if [ -z "$chain_id" ]; then
# Try alternative endpoint # Try alternative endpoint