Skip to content

Commit

Permalink
test: fix localnet testing script (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmic-vagabond authored Aug 30, 2023
1 parent 6d357eb commit 8dfaf60
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions scripts/testing/setup_localnet_nodes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ initialize_nodes() {
echo "Configuring $folder node..."
${BINARY} config node "tcp://localhost:${node_rpc_port}" --home "/tmp/$folder" >/dev/null 2>&1
${BINARY} config keyring-backend test --home "/tmp/$folder" >/dev/null 2>&1
${BINARY} config broadcast-mode block --home "/tmp/$folder" >/dev/null 2>&1
${BINARY} config broadcast-mode sync --home "/tmp/$folder" >/dev/null 2>&1
done
}

Expand Down Expand Up @@ -216,10 +216,10 @@ EOF
sed -i "" "s/^timeout_commit =.*/timeout_commit = \"4s\"/" "$config_path"

# Update grpc in app with node port
sed -i "" "s/^address = \"0.0.0.0:9090\"/address = \"0.0.0.0:${node_grpc_port}\"/" "$app_path"
sed -i "" "s/^address = \"localhost:9090\"/address = \"localhost:${node_grpc_port}\"/" "$app_path"

# Update grpc web in app with node port
sed -i "" "s/^address = \"0.0.0.0:9091\"/address = \"0.0.0.0:${node_grpc_web_port}\"/" "$app_path"
sed -i "" "s/^address = \"localhost:9091\"/address = \"localhost:${node_grpc_web_port}\"/" "$app_path"
done
}

Expand Down Expand Up @@ -336,7 +336,7 @@ submit_upgrade_proposal() {
--no-validate \
--from=validator \
--fees=100000uelys \
--gas=auto \
--gas=200000 \
--home="/tmp/${first_folder}" \
-y >/dev/null 2>&1

Expand All @@ -347,6 +347,7 @@ submit_upgrade_proposal() {
yes \
--from=validator \
--fees=100000uelys \
--gas=200000 \
--home="/tmp/${folder}" \
-y >/dev/null 2>&1
done
Expand Down Expand Up @@ -397,6 +398,9 @@ wait_for_rpc_ports() {
done

echo "All RPC ports are open."

echo "Waiting 5 seconds for blockchain state to become available..."
sleep 5
}

# Main script execution
Expand Down

0 comments on commit 8dfaf60

Please sign in to comment.