mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 04:41:02 +00:00
Bump jsonrpc to fix hang on exit (#1367)
* Test RPC fix. * Fix meta in unsubscribe. * Fix meta in unsubscribe.
This commit is contained in:
@@ -64,7 +64,7 @@ build_rpc_trait! {
|
||||
|
||||
/// Unsubscribe from extrinsic watching.
|
||||
#[rpc(name = "author_unwatchExtrinsic")]
|
||||
fn unwatch_extrinsic(&self, Self::Metadata, SubscriptionId) -> Result<bool>;
|
||||
fn unwatch_extrinsic(&self, Option<Self::Metadata>, SubscriptionId) -> Result<bool>;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -149,7 +149,7 @@ impl<B, E, P, RA> AuthorApi<ExHash<P>, BlockHash<P>> for Author<B, E, P, RA> whe
|
||||
})
|
||||
}
|
||||
|
||||
fn unwatch_extrinsic(&self, _metadata: Self::Metadata, id: SubscriptionId) -> Result<bool> {
|
||||
fn unwatch_extrinsic(&self, _metadata: Option<Self::Metadata>, id: SubscriptionId) -> Result<bool> {
|
||||
Ok(self.subscriptions.cancel(id))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ build_rpc_trait! {
|
||||
|
||||
/// Unsubscribe from new head subscription.
|
||||
#[rpc(name = "chain_unsubscribeNewHead", alias = ["unsubscribe_newHead", ])]
|
||||
fn unsubscribe_new_head(&self, Self::Metadata, SubscriptionId) -> RpcResult<bool>;
|
||||
fn unsubscribe_new_head(&self, Option<Self::Metadata>, SubscriptionId) -> RpcResult<bool>;
|
||||
}
|
||||
|
||||
#[pubsub(name = "chain_finalisedHead")] {
|
||||
@@ -75,7 +75,7 @@ build_rpc_trait! {
|
||||
|
||||
/// Unsubscribe from new head subscription.
|
||||
#[rpc(name = "chain_unsubscribeFinalisedHeads")]
|
||||
fn unsubscribe_finalised_heads(&self, Self::Metadata, SubscriptionId) -> RpcResult<bool>;
|
||||
fn unsubscribe_finalised_heads(&self, Option<Self::Metadata>, SubscriptionId) -> RpcResult<bool>;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -189,7 +189,7 @@ impl<B, E, Block, RA> ChainApi<Block::Hash, Block::Header, NumberFor<Block>, Sig
|
||||
)
|
||||
}
|
||||
|
||||
fn unsubscribe_new_head(&self, _metadata: Self::Metadata, id: SubscriptionId) -> RpcResult<bool> {
|
||||
fn unsubscribe_new_head(&self, _metadata: Option<Self::Metadata>, id: SubscriptionId) -> RpcResult<bool> {
|
||||
Ok(self.subscriptions.cancel(id))
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ impl<B, E, Block, RA> ChainApi<Block::Hash, Block::Header, NumberFor<Block>, Sig
|
||||
)
|
||||
}
|
||||
|
||||
fn unsubscribe_finalised_heads(&self, _metadata: Self::Metadata, id: SubscriptionId) -> RpcResult<bool> {
|
||||
fn unsubscribe_finalised_heads(&self, _metadata: Option<Self::Metadata>, id: SubscriptionId) -> RpcResult<bool> {
|
||||
Ok(self.subscriptions.cancel(id))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ build_rpc_trait! {
|
||||
|
||||
/// Unsubscribe from runtime version subscription
|
||||
#[rpc(name = "state_unsubscribeRuntimeVersion", alias = ["chain_unsubscribeRuntimeVersion", ])]
|
||||
fn unsubscribe_runtime_version(&self, Self::Metadata, SubscriptionId) -> RpcResult<bool>;
|
||||
fn unsubscribe_runtime_version(&self, Option<Self::Metadata>, SubscriptionId) -> RpcResult<bool>;
|
||||
}
|
||||
|
||||
#[pubsub(name = "state_storage")] {
|
||||
@@ -95,7 +95,7 @@ build_rpc_trait! {
|
||||
|
||||
/// Unsubscribe from storage subscription
|
||||
#[rpc(name = "state_unsubscribeStorage")]
|
||||
fn unsubscribe_storage(&self, Self::Metadata, SubscriptionId) -> RpcResult<bool>;
|
||||
fn unsubscribe_storage(&self, Option<Self::Metadata>, SubscriptionId) -> RpcResult<bool>;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -281,7 +281,7 @@ impl<B, E, Block, RA> StateApi<Block::Hash> for State<B, E, Block, RA> where
|
||||
})
|
||||
}
|
||||
|
||||
fn unsubscribe_storage(&self, _meta: Self::Metadata, id: SubscriptionId) -> RpcResult<bool> {
|
||||
fn unsubscribe_storage(&self, _meta: Option<Self::Metadata>, id: SubscriptionId) -> RpcResult<bool> {
|
||||
Ok(self.subscriptions.cancel(id))
|
||||
}
|
||||
|
||||
@@ -333,7 +333,7 @@ impl<B, E, Block, RA> StateApi<Block::Hash> for State<B, E, Block, RA> where
|
||||
});
|
||||
}
|
||||
|
||||
fn unsubscribe_runtime_version(&self, _meta: Self::Metadata, id: SubscriptionId) -> RpcResult<bool> {
|
||||
fn unsubscribe_runtime_version(&self, _meta: Option<Self::Metadata>, id: SubscriptionId) -> RpcResult<bool> {
|
||||
Ok(self.subscriptions.cancel(id))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user