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

fix: set current_node_count to 0 if it does not exists #64

Merged
merged 2 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions resources/ansible/roles/node/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@

- name: calculate number of nodes to add
set_fact:
nodes_to_add: "{{ node_instance_count | int - current_node_count | int }}"
when: current_node_count is defined
nodes_to_add: "{{ node_instance_count | int - (current_node_count | default(0)) | int }}"

- name: add node services
become: True
Expand Down
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,10 @@ impl TestnetDeploy {
)?;
let node_info = parse_output(output)?;

let multiaddr = format!("/ip4/{}/tcp/12000/p2p/{}", genesis_ip, node_info.peer_id);
let multiaddr = format!(
"/ip4/{genesis_ip}/udp/12000/quic-v1/p2p/{}",
node_info.peer_id
);
// The genesis_ip is obviously inside the multiaddr, but it's just being returned as a
// separate item for convenience.
Ok((multiaddr, genesis_ip))
Expand Down
Loading