Merge branch 'master' into opt-in-verifier-scaling

This commit is contained in:
Robert Habermeier
2016-12-06 15:37:10 +01:00
208 changed files with 2157 additions and 2253 deletions

View File

@@ -48,7 +48,7 @@ usage! {
flag_testnet: bool,
flag_import_geth_keys: bool,
flag_datadir: Option<String>,
flag_networkid: Option<usize>,
flag_networkid: Option<u64>,
flag_peers: Option<u16>,
flag_nodekey: Option<String>,
flag_nodiscover: bool,
@@ -122,7 +122,7 @@ usage! {
or |c: &Config| otry!(c.network).nat.clone(),
flag_allow_ips: String = "all",
or |c: &Config| otry!(c.network).allow_ips.clone(),
flag_network_id: Option<usize> = None,
flag_network_id: Option<u64> = None,
or |c: &Config| otry!(c.network).id.clone().map(Some),
flag_bootnodes: Option<String> = None,
or |c: &Config| otry!(c.network).bootnodes.clone().map(|vec| Some(vec.join(","))),
@@ -332,7 +332,7 @@ struct Network {
max_pending_peers: Option<u16>,
nat: Option<String>,
allow_ips: Option<String>,
id: Option<usize>,
id: Option<u64>,
bootnodes: Option<Vec<String>>,
discovery: Option<bool>,
node_key: Option<String>,

View File

@@ -532,7 +532,7 @@ impl Configuration {
Ok(ret)
}
fn network_id(&self) -> Option<usize> {
fn network_id(&self) -> Option<u64> {
self.args.flag_network_id.or(self.args.flag_networkid)
}

View File

@@ -44,8 +44,6 @@ extern crate serde_json;
extern crate rlp;
extern crate ethcore_hash_fetch as hash_fetch;
extern crate json_ipc_server as jsonipc;
extern crate ethcore_ipc_hypervisor as hypervisor;
extern crate ethcore_rpc;

View File

@@ -19,14 +19,12 @@ use std::sync::Arc;
use std::net::SocketAddr;
use std::io;
use io::PanicHandler;
use ethcore_rpc::{RpcServerError, RpcServer as Server};
use jsonipc;
use ethcore_rpc::{RpcServerError, RpcServer as Server, IpcServerError};
use rpc_apis;
use rpc_apis::ApiSet;
use helpers::parity_ipc_path;
pub use jsonipc::Server as IpcServer;
pub use ethcore_rpc::Server as HttpServer;
pub use ethcore_rpc::{IpcServer, Server as HttpServer};
#[derive(Debug, PartialEq)]
pub struct HttpConfiguration {
@@ -126,7 +124,7 @@ pub fn new_ipc(conf: IpcConfiguration, deps: &Dependencies) -> Result<Option<Ipc
pub fn setup_ipc_rpc_server(dependencies: &Dependencies, addr: &str, apis: ApiSet) -> Result<IpcServer, String> {
let server = try!(setup_rpc_server(apis, dependencies));
match server.start_ipc(addr) {
Err(jsonipc::Error::Io(io_error)) => Err(format!("RPC io error: {}", io_error)),
Err(IpcServerError::Io(io_error)) => Err(format!("RPC io error: {}", io_error)),
Err(any_error) => Err(format!("Rpc error: {:?}", any_error)),
Ok(server) => Ok(server)
}

View File

@@ -71,7 +71,7 @@ pub struct RunCmd {
pub http_conf: HttpConfiguration,
pub ipc_conf: IpcConfiguration,
pub net_conf: NetworkConfiguration,
pub network_id: Option<usize>,
pub network_id: Option<u64>,
pub warp_sync: bool,
pub acc_conf: AccountsConfig,
pub gas_pricer: GasPricerConfig,