[RPC] Move runtime version from chain to state (#1243)

* Move runtimeVersion to state, add rudimentary test for subscription.

* Bump to latest jsonrpc.
This commit is contained in:
Tomasz Drwięga
2018-12-10 18:46:39 +00:00
committed by Robert Habermeier
parent 6299b42a4d
commit d28fda3d84
6 changed files with 121 additions and 104 deletions
+2 -2
View File
@@ -64,7 +64,7 @@ build_rpc_trait! {
/// Unsubscribe from extrinsic watching.
#[rpc(name = "author_unwatchExtrinsic")]
fn unwatch_extrinsic(&self, SubscriptionId) -> Result<bool>;
fn unwatch_extrinsic(&self, 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, id: SubscriptionId) -> Result<bool> {
fn unwatch_extrinsic(&self, _metadata: Self::Metadata, id: SubscriptionId) -> Result<bool> {
Ok(self.subscriptions.cancel(id))
}
}