Consensus message buffering and more (#114)

* CLI options and keystore integration

* Replace multiqueue with future::mpsc

* BFT gossip

* Revert to app_dirs

* generate_from_seed commented

* Refactor event loop

* Start consensus by timer

* Message buffering

* Minor fixes

* Work around duty-roster issue.

* some more minor fixes

* fix compilation

* more consistent formatting

* make bft input stream never conclude

* Minor fixes

* add timestamp module to executive

* more cleanups and logging

* Fixed message propagation
This commit is contained in:
Arkadiy Paronyan
2018-04-06 19:18:26 +02:00
committed by Gav Wood
parent 633b9f4c0b
commit b3dd4e74fd
34 changed files with 413 additions and 146 deletions
+4 -3
View File
@@ -43,6 +43,7 @@ pub mod error;
use std::path::{Path, PathBuf};
use std::net::SocketAddr;
use std::sync::mpsc;
/// Parse command line arguments and start the node.
///
@@ -52,7 +53,7 @@ use std::net::SocketAddr;
/// 9556-9591 Unassigned
/// 9803-9874 Unassigned
/// 9926-9949 Unassigned
pub fn run<I, T>(args: I) -> error::Result<()> where
pub fn run<I, T>(args: I, exit: mpsc::Receiver<()>) -> error::Result<()> where
I: IntoIterator<Item = T>,
T: Into<std::ffi::OsString> + Clone,
{
@@ -116,9 +117,9 @@ pub fn run<I, T>(args: I) -> error::Result<()> where
address.set_port(rpc_port);
}
let handler = rpc::rpc_handler(service.client());
let server = rpc::start_http(&address, handler)?;
let _server = rpc::start_http(&address, handler)?;
server.wait();
exit.recv().ok();
Ok(())
}