verify if the peer isn known before adding it.

This commit is contained in:
goldsquid
2025-12-16 12:47:33 +07:00
parent 00c9c53cc8
commit 7765dd160f
2 changed files with 92 additions and 6 deletions

View File

@@ -141,7 +141,7 @@ while IFS= read -r enode; do
fi
echo "Adding peer: ${enode:0:50}..."
./check-enode.sh "$enode"
./check-enode.sh "$enode" --target "$TARGET_URL"
if [ $? -ne 0 ]; then
echo "Error: Peer is not reachable - do not add"
continue