Skip to content

Commit

Permalink
fix: substrate runner, support new libp2p addr log (#1892)
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasad1 authored Jan 6, 2025
1 parent 6275284 commit 27e275f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions testing/substrate-runner/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,10 @@ fn try_find_substrate_port_from_output(r: impl Read + Send + 'static) -> Substra

// Parse the p2p port line (present in debug logs)
let p2p_port_line = line
// oldest message:
.rsplit_once("New listen address: /ip4/127.0.0.1/tcp/")
// slightly newer message:
.or_else(|| line.rsplit_once("New listen address address=/ip4/127.0.0.1/tcp/"))
.map(|(_, address_str)| address_str);

if let Some(line_port) = p2p_port_line {
Expand Down

0 comments on commit 27e275f

Please sign in to comment.