Bump jsonrpc to fix hang on exit (#1367)

* Test RPC fix.

* Fix meta in unsubscribe.

* Fix meta in unsubscribe.
This commit is contained in:
Tomasz Drwięga
2019-01-08 14:46:07 +01:00
committed by Gav Wood
parent b104c02eb6
commit 38cdd0a5c6
4 changed files with 16 additions and 16 deletions
+6 -6
View File
@@ -1088,7 +1088,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "jsonrpc-core"
version = "9.0.0"
source = "git+https://github.com/paritytech/jsonrpc.git#3604d9990f051b8b440961b0877a46140bb87a50"
source = "git+https://github.com/paritytech/jsonrpc.git#0227e70fdce25cad9c71be222dc9e7f754c08033"
dependencies = [
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1100,7 +1100,7 @@ dependencies = [
[[package]]
name = "jsonrpc-http-server"
version = "9.0.0"
source = "git+https://github.com/paritytech/jsonrpc.git#3604d9990f051b8b440961b0877a46140bb87a50"
source = "git+https://github.com/paritytech/jsonrpc.git#0227e70fdce25cad9c71be222dc9e7f754c08033"
dependencies = [
"hyper 0.12.19 (registry+https://github.com/rust-lang/crates.io-index)",
"jsonrpc-core 9.0.0 (git+https://github.com/paritytech/jsonrpc.git)",
@@ -1113,7 +1113,7 @@ dependencies = [
[[package]]
name = "jsonrpc-macros"
version = "9.0.0"
source = "git+https://github.com/paritytech/jsonrpc.git#3604d9990f051b8b440961b0877a46140bb87a50"
source = "git+https://github.com/paritytech/jsonrpc.git#0227e70fdce25cad9c71be222dc9e7f754c08033"
dependencies = [
"jsonrpc-core 9.0.0 (git+https://github.com/paritytech/jsonrpc.git)",
"jsonrpc-pubsub 9.0.0 (git+https://github.com/paritytech/jsonrpc.git)",
@@ -1123,7 +1123,7 @@ dependencies = [
[[package]]
name = "jsonrpc-pubsub"
version = "9.0.0"
source = "git+https://github.com/paritytech/jsonrpc.git#3604d9990f051b8b440961b0877a46140bb87a50"
source = "git+https://github.com/paritytech/jsonrpc.git#0227e70fdce25cad9c71be222dc9e7f754c08033"
dependencies = [
"jsonrpc-core 9.0.0 (git+https://github.com/paritytech/jsonrpc.git)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1133,7 +1133,7 @@ dependencies = [
[[package]]
name = "jsonrpc-server-utils"
version = "9.0.0"
source = "git+https://github.com/paritytech/jsonrpc.git#3604d9990f051b8b440961b0877a46140bb87a50"
source = "git+https://github.com/paritytech/jsonrpc.git#0227e70fdce25cad9c71be222dc9e7f754c08033"
dependencies = [
"bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
"globset 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1149,7 +1149,7 @@ dependencies = [
[[package]]
name = "jsonrpc-ws-server"
version = "9.0.0"
source = "git+https://github.com/paritytech/jsonrpc.git#3604d9990f051b8b440961b0877a46140bb87a50"
source = "git+https://github.com/paritytech/jsonrpc.git#0227e70fdce25cad9c71be222dc9e7f754c08033"
dependencies = [
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
"jsonrpc-core 9.0.0 (git+https://github.com/paritytech/jsonrpc.git)",
+2 -2
View File
@@ -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))
}
}
+4 -4
View File
@@ -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))
}
}
+4 -4
View File
@@ -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))
}
}