Skip to content

Commit

Permalink
Fix lightclient get_url usage
Browse files Browse the repository at this point in the history
  • Loading branch information
jsdw committed Jun 13, 2024
1 parent 2c200cc commit 9020006
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions testing/integration-tests/src/utils/node_proc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ async fn build_light_client<T: Config>(proc: &SubstrateNode) -> Result<OnlineCli
use subxt::lightclient::{ChainConfig, LightClient};

// RPC endpoint.
let ws_url = format!("ws://{}:{}", get_url(), proc.ws_port());
let ws_url = get_url(proc.as_ref().map(|p| p.ws_port()));

// Wait for a few blocks to be produced using the subxt client.
let client = OnlineClient::<T>::from_url(ws_url.clone())
Expand All @@ -261,8 +261,7 @@ async fn build_light_client<T: Config>(proc: &SubstrateNode) -> Result<OnlineCli

// Now, configure a light client; fetch the chain spec and modify the bootnodes.
let bootnode = format!(
"/ip4/{}/tcp/{}/p2p/{}",
get_url(),
"/ip4/127.0.0.1/tcp/{}/p2p/{}",
proc.p2p_port(),
proc.p2p_address()
);
Expand Down

0 comments on commit 9020006

Please sign in to comment.