mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 07:31:02 +00:00
[relay-substrate-client] Bump jsonrpsee (#2066)
This commit is contained in:
committed by
Bastian Köcher
parent
6acd45804d
commit
70cf01d47a
@@ -495,7 +495,7 @@ construct_runtime!(
|
|||||||
Scheduler: polkadot_runtime_parachains::scheduler::{Pallet, Storage},
|
Scheduler: polkadot_runtime_parachains::scheduler::{Pallet, Storage},
|
||||||
Paras: polkadot_runtime_parachains::paras::{Pallet, Call, Storage, Event, Config},
|
Paras: polkadot_runtime_parachains::paras::{Pallet, Call, Storage, Event, Config},
|
||||||
Initializer: polkadot_runtime_parachains::initializer::{Pallet, Call, Storage},
|
Initializer: polkadot_runtime_parachains::initializer::{Pallet, Call, Storage},
|
||||||
Dmp: polkadot_runtime_parachains::dmp::{Pallet, Call, Storage},
|
Dmp: polkadot_runtime_parachains::dmp::{Pallet, Storage},
|
||||||
Ump: polkadot_runtime_parachains::ump::{Pallet, Call, Storage, Event},
|
Ump: polkadot_runtime_parachains::ump::{Pallet, Call, Storage, Event},
|
||||||
Hrmp: polkadot_runtime_parachains::hrmp::{Pallet, Call, Storage, Event<T>, Config},
|
Hrmp: polkadot_runtime_parachains::hrmp::{Pallet, Call, Storage, Event<T>, Config},
|
||||||
SessionInfo: polkadot_runtime_parachains::session_info::{Pallet, Storage},
|
SessionInfo: polkadot_runtime_parachains::session_info::{Pallet, Storage},
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ async-std = { version = "1.6.5", features = ["attributes"] }
|
|||||||
async-trait = "0.1"
|
async-trait = "0.1"
|
||||||
codec = { package = "parity-scale-codec", version = "3.1.5" }
|
codec = { package = "parity-scale-codec", version = "3.1.5" }
|
||||||
futures = "0.3.28"
|
futures = "0.3.28"
|
||||||
jsonrpsee = { version = "0.16", features = ["macros", "ws-client"] }
|
jsonrpsee = { version = "0.17", features = ["macros", "ws-client"] }
|
||||||
log = "0.4.17"
|
log = "0.4.17"
|
||||||
num-traits = "0.2"
|
num-traits = "0.2"
|
||||||
rand = "0.8"
|
rand = "0.8"
|
||||||
|
|||||||
@@ -231,7 +231,7 @@ impl<C: Chain> Client<C> {
|
|||||||
let client = tokio
|
let client = tokio
|
||||||
.spawn(async move {
|
.spawn(async move {
|
||||||
RpcClientBuilder::default()
|
RpcClientBuilder::default()
|
||||||
.max_notifs_per_subscription(MAX_SUBSCRIPTION_CAPACITY)
|
.max_buffer_capacity_per_subscription(MAX_SUBSCRIPTION_CAPACITY)
|
||||||
.build(&uri)
|
.build(&uri)
|
||||||
.await
|
.await
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -138,13 +138,11 @@ impl Error {
|
|||||||
impl MaybeConnectionError for Error {
|
impl MaybeConnectionError for Error {
|
||||||
fn is_connection_error(&self) -> bool {
|
fn is_connection_error(&self) -> bool {
|
||||||
match *self {
|
match *self {
|
||||||
Error::RpcError(RpcError::Transport(_))
|
Error::RpcError(RpcError::Transport(_)) |
|
||||||
// right now if connection to the ws server is dropped (after it is already established),
|
Error::RpcError(RpcError::RestartNeeded(_)) |
|
||||||
// we're getting this error
|
Error::ClientNotSynced(_) => true,
|
||||||
| Error::RpcError(RpcError::Internal(_))
|
Error::FailedToReadBestFinalizedHeaderHash { ref error, .. } =>
|
||||||
| Error::RpcError(RpcError::RestartNeeded(_))
|
error.is_connection_error(),
|
||||||
| Error::ClientNotSynced(_) => true,
|
|
||||||
Error::FailedToReadBestFinalizedHeaderHash { ref error, .. } => error.is_connection_error(),
|
|
||||||
Error::FailedToReadBestHeader { ref error, .. } => error.is_connection_error(),
|
Error::FailedToReadBestHeader { ref error, .. } => error.is_connection_error(),
|
||||||
Error::FailedToReadHeaderByHash { ref error, .. } => error.is_connection_error(),
|
Error::FailedToReadHeaderByHash { ref error, .. } => error.is_connection_error(),
|
||||||
Error::ErrorExecutingRuntimeCall { ref error, .. } => error.is_connection_error(),
|
Error::ErrorExecutingRuntimeCall { ref error, .. } => error.is_connection_error(),
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ pub(crate) trait SubstrateAuthor<C> {
|
|||||||
async fn pending_extrinsics(&self) -> RpcResult<Vec<Bytes>>;
|
async fn pending_extrinsics(&self) -> RpcResult<Vec<Bytes>>;
|
||||||
/// Submit and watch for extrinsic state.
|
/// Submit and watch for extrinsic state.
|
||||||
#[subscription(name = "submitAndWatchExtrinsic", unsubscribe = "unwatchExtrinsic", item = TransactionStatusOf<C>)]
|
#[subscription(name = "submitAndWatchExtrinsic", unsubscribe = "unwatchExtrinsic", item = TransactionStatusOf<C>)]
|
||||||
fn submit_and_watch_extrinsic(&self, extrinsic: Bytes);
|
async fn submit_and_watch_extrinsic(&self, extrinsic: Bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// RPC methods of Substrate `state` namespace, that we are using.
|
/// RPC methods of Substrate `state` namespace, that we are using.
|
||||||
@@ -118,7 +118,7 @@ pub trait SubstrateFinalityClient<C: Chain> {
|
|||||||
pub(crate) trait SubstrateGrandpa<C> {
|
pub(crate) trait SubstrateGrandpa<C> {
|
||||||
/// Subscribe to GRANDPA justifications.
|
/// Subscribe to GRANDPA justifications.
|
||||||
#[subscription(name = "subscribeJustifications", unsubscribe = "unsubscribeJustifications", item = Bytes)]
|
#[subscription(name = "subscribeJustifications", unsubscribe = "unsubscribeJustifications", item = Bytes)]
|
||||||
fn subscribe_justifications(&self);
|
async fn subscribe_justifications(&self);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// RPC finality methods of Substrate `grandpa` namespace, that we are using.
|
/// RPC finality methods of Substrate `grandpa` namespace, that we are using.
|
||||||
@@ -136,7 +136,7 @@ impl<C: ChainWithGrandpa> SubstrateFinalityClient<C> for SubstrateGrandpaFinalit
|
|||||||
pub(crate) trait SubstrateBeefy<C> {
|
pub(crate) trait SubstrateBeefy<C> {
|
||||||
/// Subscribe to BEEFY justifications.
|
/// Subscribe to BEEFY justifications.
|
||||||
#[subscription(name = "subscribeJustifications", unsubscribe = "unsubscribeJustifications", item = Bytes)]
|
#[subscription(name = "subscribeJustifications", unsubscribe = "unsubscribeJustifications", item = Bytes)]
|
||||||
fn subscribe_justifications(&self);
|
async fn subscribe_justifications(&self);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// RPC finality methods of Substrate `beefy` namespace, that we are using.
|
/// RPC finality methods of Substrate `beefy` namespace, that we are using.
|
||||||
|
|||||||
Reference in New Issue
Block a user