mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-08 22:58:00 +00:00
update jsonrpsee (#251)
This commit is contained in:
+3
-3
@@ -24,9 +24,9 @@ client = ["substrate-subxt-client"]
|
||||
log = "0.4.13"
|
||||
thiserror = "1.0.23"
|
||||
futures = "0.3.10"
|
||||
jsonrpsee-types = "0.2.0-alpha.2"
|
||||
jsonrpsee-ws-client = "0.2.0-alpha.2"
|
||||
jsonrpsee-http-client = "0.2.0-alpha.2"
|
||||
jsonrpsee-types = "=0.2.0-alpha.3"
|
||||
jsonrpsee-ws-client = "=0.2.0-alpha.3"
|
||||
jsonrpsee-http-client = "=0.2.0-alpha.3"
|
||||
num-traits = { version = "0.2.14", default-features = false }
|
||||
serde = { version = "1.0.119", features = ["derive"] }
|
||||
serde_json = "1.0.61"
|
||||
|
||||
+2
-2
@@ -15,8 +15,8 @@ keywords = ["parity", "substrate", "blockchain"]
|
||||
async-std = "1.8.0"
|
||||
futures = { version = "0.3.9", features = ["compat"], package = "futures" }
|
||||
futures01 = { package = "futures", version = "0.1.29" }
|
||||
jsonrpsee-types = "0.2.0-alpha"
|
||||
jsonrpsee-ws-client = "0.2.0-alpha"
|
||||
jsonrpsee-types = "=0.2.0-alpha.3"
|
||||
jsonrpsee-ws-client = "=0.2.0-alpha.3"
|
||||
log = "0.4.13"
|
||||
sc-network = { version = "0.9.0", default-features = false }
|
||||
sc-client-db = "0.9.0"
|
||||
|
||||
+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