mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 08:47:57 +00:00
Upgrade jsonrpsee to v0.4.1 (#10022)
* Upgrade jsonrpsee to v0.4.1 * remove needless BlockT trait bound * use default wss port in URL * Fix try_runtime build * Partially fix for "remote-tests" feature * Review feedback * fmt * Sort out trait bounds for benches * Fmt * fmt again? * fmt with nightly-2021-09-13 * Upgrade try-runtime as well * fmt Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
This commit is contained in:
@@ -31,6 +31,4 @@ sp-externalities = { version = "0.10.0-dev", path = "../../../../primitives/exte
|
||||
sp-version = { version = "4.0.0-dev", path = "../../../../primitives/version" }
|
||||
|
||||
remote-externalities = { version = "0.10.0-dev", path = "../../remote-externalities" }
|
||||
jsonrpsee-ws-client = { version = "0.3.1", default-features = false, features = [
|
||||
"tokio1",
|
||||
]}
|
||||
jsonrpsee = { version = "0.4.1", default-features = false, features = ["ws-client"]}
|
||||
|
||||
@@ -19,9 +19,9 @@ use crate::{
|
||||
build_executor, ensure_matching_spec, extract_code, full_extensions, local_spec, parse,
|
||||
state_machine_call, SharedParams, LOG_TARGET,
|
||||
};
|
||||
use jsonrpsee_ws_client::{
|
||||
types::{traits::SubscriptionClient, v2::params::JsonRpcParams, Subscription},
|
||||
WsClientBuilder,
|
||||
use jsonrpsee::{
|
||||
types::{traits::SubscriptionClient, Subscription},
|
||||
ws_client::WsClientBuilder,
|
||||
};
|
||||
use parity_scale_codec::Decode;
|
||||
use remote_externalities::{rpc_api, Builder, Mode, OnlineConfig};
|
||||
@@ -72,7 +72,7 @@ where
|
||||
|
||||
log::info!(target: LOG_TARGET, "subscribing to {:?} / {:?}", SUB, UN_SUB);
|
||||
let mut subscription: Subscription<Block::Header> =
|
||||
client.subscribe(&SUB, JsonRpcParams::NoParams, &UN_SUB).await.unwrap();
|
||||
client.subscribe(&SUB, None, &UN_SUB).await.unwrap();
|
||||
|
||||
let (code_key, code) = extract_code(&config.chain_spec)?;
|
||||
let executor = build_executor::<ExecDispatch>(&shared, &config);
|
||||
|
||||
@@ -281,7 +281,10 @@ use sp_core::{
|
||||
};
|
||||
use sp_externalities::Extensions;
|
||||
use sp_keystore::{testing::KeyStore, KeystoreExt};
|
||||
use sp_runtime::traits::{Block as BlockT, NumberFor};
|
||||
use sp_runtime::{
|
||||
traits::{Block as BlockT, NumberFor},
|
||||
DeserializeOwned,
|
||||
};
|
||||
use sp_state_machine::{OverlayedChanges, StateMachine};
|
||||
use std::{fmt::Debug, path::PathBuf, str::FromStr};
|
||||
|
||||
@@ -464,7 +467,7 @@ pub enum State {
|
||||
|
||||
impl State {
|
||||
/// Create the [`remote_externalities::Builder`] from self.
|
||||
pub(crate) fn builder<Block: BlockT>(&self) -> sc_cli::Result<Builder<Block>>
|
||||
pub(crate) fn builder<Block: BlockT + DeserializeOwned>(&self) -> sc_cli::Result<Builder<Block>>
|
||||
where
|
||||
Block::Hash: FromStr,
|
||||
<Block::Hash as FromStr>::Err: Debug,
|
||||
|
||||
Reference in New Issue
Block a user