Storage changes subscription (#464)

* Initial implementation of storage events.

* Attaching storage events.

* Expose storage modification stream over RPC.

* Use FNV for hashing small keys.

* Fix and add tests.

* Swap alias and RPC name.

* Fix demo.

* Addressing review grumbles.

* Fix comment.
This commit is contained in:
Tomasz Drwięga
2018-08-01 14:29:52 +02:00
committed by Svyatoslav Nikolsky
parent 098cfcd319
commit 503bcb5686
16 changed files with 484 additions and 61 deletions
+2 -1
View File
@@ -173,9 +173,10 @@ pub fn run<I, T>(args: I) -> error::Result<()> where
let mut runtime = Runtime::new()?;
let _rpc_servers = {
let handler = || {
let state = rpc::apis::state::State::new(client.clone(), runtime.executor());
let chain = rpc::apis::chain::Chain::new(client.clone(), runtime.executor());
let author = rpc::apis::author::Author::new(client.clone(), Arc::new(DummyPool), runtime.executor());
rpc::rpc_handler::<Block, _, _, _, _>(client.clone(), chain, author, DummySystem)
rpc::rpc_handler::<Block, _, _, _, _>(state, chain, author, DummySystem)
};
let http_address = "127.0.0.1:9933".parse().unwrap();
let ws_address = "127.0.0.1:9944".parse().unwrap();