Skip to content

Commit

Permalink
Handle p2p port
Browse files Browse the repository at this point in the history
  • Loading branch information
ameba23 committed Dec 3, 2024
1 parent a1b2bee commit 8222257
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/testing-utils/src/node_proc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ impl TestNodeProcessBuilder {
}

cmd.arg(format!("--rpc-port={}", self.port));
if port != 9944 {
let (p2p_port, _http_port, _ws_port) = next_open_port()
.ok_or_else(|| "No available ports in the given port range".to_owned())?;
cmd.arg(format!("--port={p2p_port}"));
}
// let ws_port = if self.scan_port_range {
// // let (p2p_port, _http_port, ws_port) = next_open_port()
// // .ok_or_else(|| "No available ports in the given port range".to_owned())?;
Expand Down

0 comments on commit 8222257

Please sign in to comment.