mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-22 09:11:02 +00:00
[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:
committed by
Robert Habermeier
parent
6299b42a4d
commit
d28fda3d84
@@ -17,7 +17,7 @@
|
||||
use super::*;
|
||||
use jsonrpc_macros::pubsub;
|
||||
use test_client::{self, TestClient};
|
||||
use test_client::runtime::{Block, Header, VERSION};
|
||||
use test_client::runtime::{Block, Header};
|
||||
use consensus::BlockOrigin;
|
||||
|
||||
#[test]
|
||||
@@ -246,19 +246,3 @@ fn should_notify_about_finalised_block() {
|
||||
// no more notifications on this channel
|
||||
assert_eq!(core.block_on(next.into_future()).unwrap().0, None);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn should_return_runtime_version() {
|
||||
let core = ::tokio::runtime::Runtime::new().unwrap();
|
||||
let remote = core.executor();
|
||||
|
||||
let client = Chain {
|
||||
client: Arc::new(test_client::new()),
|
||||
subscriptions: Subscriptions::new(remote),
|
||||
};
|
||||
|
||||
assert_matches!(
|
||||
client.runtime_version(None.into()),
|
||||
Ok(ref ver) if ver == &VERSION
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user