remote ext: make it possible to use an existing ws connection (#10737)

* remote ext: make it possible to pass ws client

* grumbles: introduce `map_uri`
This commit is contained in:
Niklas Adolfsson
2022-01-28 10:04:52 +01:00
committed by GitHub
parent 7f3bb8d0da
commit 3f69a2e1ff
4 changed files with 232 additions and 60 deletions
@@ -19,8 +19,8 @@
// TODO: Consolidate one off RPC calls https://github.com/paritytech/substrate/issues/8988
use jsonrpsee::{
core::client::ClientT,
rpc_params,
types::traits::Client,
ws_client::{WsClient, WsClientBuilder},
};
use sp_runtime::{
@@ -73,7 +73,7 @@ where
Ok(signed_block.block)
}
/// Build a website client that connects to `from`.
/// Build a websocket client that connects to `from`.
async fn build_client<S: AsRef<str>>(from: S) -> Result<WsClient, String> {
WsClientBuilder::default()
.max_request_body_size(u32::MAX)