mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
update jsonrpsee (#251)
This commit is contained in:
+1
-1
@@ -212,7 +212,7 @@ impl<T: Runtime> ClientBuilder<T> {
|
||||
if url.starts_with("ws://") || url.starts_with("wss://") {
|
||||
let mut config = WsConfig::with_url(&url);
|
||||
config.max_notifs_per_subscription = 4096;
|
||||
RpcClient::WebSocket(WsClient::new(config).await?)
|
||||
RpcClient::WebSocket(Arc::new(WsClient::new(config).await?))
|
||||
} else {
|
||||
let client = HttpClient::new(url, HttpConfig::default())?;
|
||||
RpcClient::Http(Arc::new(client))
|
||||
|
||||
+2
-2
@@ -165,7 +165,7 @@ use substrate_subxt_client::SubxtClient;
|
||||
#[derive(Clone)]
|
||||
pub enum RpcClient {
|
||||
/// JSONRPC client WebSocket transport.
|
||||
WebSocket(WsClient),
|
||||
WebSocket(Arc<WsClient>),
|
||||
/// JSONRPC client HTTP transport.
|
||||
// NOTE: Arc because `HttpClient` is not clone.
|
||||
Http(Arc<HttpClient>),
|
||||
@@ -224,7 +224,7 @@ impl RpcClient {
|
||||
|
||||
impl From<WsClient> for RpcClient {
|
||||
fn from(client: WsClient) -> Self {
|
||||
RpcClient::WebSocket(client)
|
||||
RpcClient::WebSocket(Arc::new(client))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user