(temporarily) Switch to jsonrpsee master (#913)

* (temporarily) switch to jsonrpsee master

* removed param used for tests
This commit is contained in:
Svyatoslav Nikolsky
2021-04-20 17:59:03 +03:00
committed by Bastian Köcher
parent 49e04b7b26
commit 5e26ba4999
4 changed files with 13 additions and 12 deletions
+3 -3
View File
@@ -9,9 +9,9 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
async-std = "1.6.5"
async-trait = "0.1.40"
codec = { package = "parity-scale-codec", version = "2.0.0" }
jsonrpsee-proc-macros = "=0.2.0-alpha.3"
jsonrpsee-types = "=0.2.0-alpha.3"
jsonrpsee-ws-client = "=0.2.0-alpha.3"
jsonrpsee-proc-macros = { git = "https://github.com/paritytech/jsonrpsee", rev = "de7b58a881512cd5ab8bbf16a56241ca808c7765" }
jsonrpsee-types = { git = "https://github.com/paritytech/jsonrpsee", rev = "de7b58a881512cd5ab8bbf16a56241ca808c7765" }
jsonrpsee-ws-client = { git = "https://github.com/paritytech/jsonrpsee", rev = "de7b58a881512cd5ab8bbf16a56241ca808c7765" }
log = "0.4.11"
num-traits = "0.2"
rand = "0.7"
@@ -24,7 +24,7 @@ use async_std::sync::{Arc, Mutex};
use codec::Decode;
use frame_system::AccountInfo;
use jsonrpsee_types::{jsonrpc::DeserializeOwned, traits::SubscriptionClient};
use jsonrpsee_ws_client::{WsClient as RpcClient, WsConfig as RpcConfig, WsSubscription as Subscription};
use jsonrpsee_ws_client::{WsClient as RpcClient, WsClientBuilder as RpcClientBuilder, WsSubscription as Subscription};
use num_traits::Zero;
use pallet_balances::AccountData;
use sp_core::{storage::StorageKey, Bytes};
@@ -105,9 +105,10 @@ impl<C: Chain> Client<C> {
params.host,
params.port,
);
let mut config = RpcConfig::with_url(&uri);
config.max_notifs_per_subscription = MAX_SUBSCRIPTION_CAPACITY;
let client = RpcClient::new(config).await?;
let client = RpcClientBuilder::default()
.max_notifs_per_subscription(MAX_SUBSCRIPTION_CAPACITY)
.build(&uri)
.await?;
Ok(Arc::new(client))
}