mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-18 09:31:02 +00:00
Chain head subscription (#126)
* Start WebSockets server. * Expose non-working subscription. * Dummy subscription for testing. * Proper implementation with event loop. * Finalized pubsub. * Bump clap. * Fix yml. * Disable WS logs. * Remove stale TransactionHash mention * Fix build from nightly API change. * Don't panic on invalid port. * Bind server to random port. * Send only best blocks.
This commit is contained in:
@@ -29,7 +29,13 @@ fn should_return_header() {
|
||||
digest: Default::default(),
|
||||
};
|
||||
|
||||
let client = Arc::new(client::new_in_mem(executor::WasmExecutor, || (test_genesis_block.clone(), vec![])).unwrap());
|
||||
let core = ::tokio_core::reactor::Core::new().unwrap();
|
||||
let remote = core.remote();
|
||||
|
||||
let client = Chain {
|
||||
client: Arc::new(client::new_in_mem(executor::WasmExecutor, || (test_genesis_block.clone(), vec![])).unwrap()),
|
||||
subscriptions: Subscriptions::new(remote),
|
||||
};
|
||||
|
||||
assert_matches!(
|
||||
ChainApi::header(&client, test_genesis_block.blake2_256().into()),
|
||||
|
||||
Reference in New Issue
Block a user