diff --git a/visibility_check.sh b/visibility_check.sh index 7d3eb7b..70d8fc5 100644 --- a/visibility_check.sh +++ b/visibility_check.sh @@ -16,10 +16,26 @@ bootstrap_peers=( output=$(grpcurl -plaintext localhost:8337 quilibrium.node.node.pb.NodeService.GetNetworkInfo) # Check if any of the specific peers are in the output +# for peer in "${bootstrap_peers[@]}"; do +# if [[ $output == *"$peer"* ]]; then +# echo "You see $peer as a bootstrap peer" +# else +# echo "Peer $peer not found" +# fi +# done + + +# Check if any of the bootstrap peers are in the output +visible=false for peer in "${bootstrap_peers[@]}"; do if [[ $output == *"$peer"* ]]; then - echo "You see $peer as a bootstrap peer" - else - echo "Peer $peer not found" + visible=true + break fi -done \ No newline at end of file +done + +if $visible ; then + echo "Great, your node is visible!" +else + echo "Sorry, your node is not visible. Please restart your node and try again." +fi \ No newline at end of file