Skip to content

Commit

Permalink
Use curl instead of netcat for pinging rootchain server in local depl…
Browse files Browse the repository at this point in the history
…oyment script (#1791)
  • Loading branch information
Stefan-Ethernal committed Aug 9, 2023
1 parent ed87b0f commit 5db2845
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ When deploying with `polybft` consensus, there are some additional dependencies:

* [go 1.20.x](https://go.dev/dl/)
* [jq](https://jqlang.github.io/jq)
* Netcat (nc)
* [curl](https://everything.curl.dev/get)

## Local development

Expand Down
12 changes: 6 additions & 6 deletions scripts/cluster
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ if [[ "$1" == "polybft" ]] && ! command -v jq >/dev/null 2>&1; then
fi

# Check if nc is installed
if [[ "$1" == "polybft" ]] && ! command -v nc >/dev/null 2>&1; then
echo "Netcat (nc) is not installed."
if [[ "$1" == "polybft" ]] && ! command -v curl >/dev/null 2>&1; then
echo "curl is not installed."
dp_error_flag=1
fi

Expand Down Expand Up @@ -90,10 +90,10 @@ function initRootchain() {
fi

set +e
t=1
while [ $t -gt 0 ]; do
nc -z 127.0.0.1 8545 </dev/null
t=$?
while true; do
if curl -sSf -o /dev/null http://127.0.0.1:8545; then
break
fi
sleep 1
done
set -e
Expand Down

0 comments on commit 5db2845

Please sign in to comment.