mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-08-08 04:45:45 +00:00
Some relayer improvments (#2902)
* added CLI arguments: full WS URI + separate for WS path URI component + additional log * URI -> URL? * added TODO * fmt
This commit is contained in:
committed by
Bastian Köcher
parent
30a0338717
commit
018d6d8d1a
@@ -264,12 +264,22 @@ impl<C: Chain> Client<C> {
|
||||
params: &ConnectionParams,
|
||||
) -> Result<(Arc<tokio::runtime::Runtime>, Arc<RpcClient>)> {
|
||||
let tokio = tokio::runtime::Runtime::new()?;
|
||||
let uri = format!(
|
||||
"{}://{}:{}",
|
||||
if params.secure { "wss" } else { "ws" },
|
||||
params.host,
|
||||
params.port,
|
||||
);
|
||||
|
||||
let uri = match params.uri {
|
||||
Some(ref uri) => uri.clone(),
|
||||
None => {
|
||||
format!(
|
||||
"{}://{}:{}{}",
|
||||
if params.secure { "wss" } else { "ws" },
|
||||
params.host,
|
||||
params.port,
|
||||
match params.path {
|
||||
Some(ref path) => format!("/{}", path),
|
||||
None => String::new(),
|
||||
},
|
||||
)
|
||||
},
|
||||
};
|
||||
log::info!(target: "bridge", "Connecting to {} node at {}", C::NAME, uri);
|
||||
|
||||
let client = tokio
|
||||
|
||||
Reference in New Issue
Block a user