mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 04:01:02 +00:00
[relay-substrate-client] Bump jsonrpsee (#2066)
This commit is contained in:
committed by
Bastian Köcher
parent
6acd45804d
commit
70cf01d47a
@@ -10,7 +10,7 @@ async-std = { version = "1.6.5", features = ["attributes"] }
|
||||
async-trait = "0.1"
|
||||
codec = { package = "parity-scale-codec", version = "3.1.5" }
|
||||
futures = "0.3.28"
|
||||
jsonrpsee = { version = "0.16", features = ["macros", "ws-client"] }
|
||||
jsonrpsee = { version = "0.17", features = ["macros", "ws-client"] }
|
||||
log = "0.4.17"
|
||||
num-traits = "0.2"
|
||||
rand = "0.8"
|
||||
|
||||
@@ -231,7 +231,7 @@ impl<C: Chain> Client<C> {
|
||||
let client = tokio
|
||||
.spawn(async move {
|
||||
RpcClientBuilder::default()
|
||||
.max_notifs_per_subscription(MAX_SUBSCRIPTION_CAPACITY)
|
||||
.max_buffer_capacity_per_subscription(MAX_SUBSCRIPTION_CAPACITY)
|
||||
.build(&uri)
|
||||
.await
|
||||
})
|
||||
|
||||
@@ -138,13 +138,11 @@ impl Error {
|
||||
impl MaybeConnectionError for Error {
|
||||
fn is_connection_error(&self) -> bool {
|
||||
match *self {
|
||||
Error::RpcError(RpcError::Transport(_))
|
||||
// right now if connection to the ws server is dropped (after it is already established),
|
||||
// we're getting this error
|
||||
| Error::RpcError(RpcError::Internal(_))
|
||||
| Error::RpcError(RpcError::RestartNeeded(_))
|
||||
| Error::ClientNotSynced(_) => true,
|
||||
Error::FailedToReadBestFinalizedHeaderHash { ref error, .. } => error.is_connection_error(),
|
||||
Error::RpcError(RpcError::Transport(_)) |
|
||||
Error::RpcError(RpcError::RestartNeeded(_)) |
|
||||
Error::ClientNotSynced(_) => true,
|
||||
Error::FailedToReadBestFinalizedHeaderHash { ref error, .. } =>
|
||||
error.is_connection_error(),
|
||||
Error::FailedToReadBestHeader { ref error, .. } => error.is_connection_error(),
|
||||
Error::FailedToReadHeaderByHash { 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>>;
|
||||
/// Submit and watch for extrinsic state.
|
||||
#[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.
|
||||
@@ -118,7 +118,7 @@ pub trait SubstrateFinalityClient<C: Chain> {
|
||||
pub(crate) trait SubstrateGrandpa<C> {
|
||||
/// Subscribe to GRANDPA justifications.
|
||||
#[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.
|
||||
@@ -136,7 +136,7 @@ impl<C: ChainWithGrandpa> SubstrateFinalityClient<C> for SubstrateGrandpaFinalit
|
||||
pub(crate) trait SubstrateBeefy<C> {
|
||||
/// Subscribe to BEEFY justifications.
|
||||
#[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.
|
||||
|
||||
Reference in New Issue
Block a user