From 8765312b883020c393da8927835046a5f7cf6818 Mon Sep 17 00:00:00 2001 From: 0xOzgur <29779769+0xOzgur@users.noreply.github.com> Date: Sun, 2 Jun 2024 04:42:08 +0300 Subject: [PATCH] for dumies --- visibility_check.sh | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) 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