Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix localnet testing script #177

Merged
merged 1 commit into from
Aug 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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