Merge pull request #3872 from ethcore/disable-light-server

remove light server capability temporarily
This commit is contained in:
Gav Wood 2016-12-19 15:22:44 +01:00 committed by GitHub
commit 002cec9e6f
4 changed files with 7 additions and 22 deletions

View File

@ -146,8 +146,6 @@ usage! {
flag_reserved_only: bool = false, flag_reserved_only: bool = false,
or |c: &Config| otry!(c.network).reserved_only.clone(), or |c: &Config| otry!(c.network).reserved_only.clone(),
flag_no_ancient_blocks: bool = false, or |_| None, flag_no_ancient_blocks: bool = false, or |_| None,
flag_serve_light: bool = false,
or |c: &Config| otry!(c.network).serve_light.clone(),
// -- API and Console Options // -- API and Console Options
// RPC // RPC
@ -259,7 +257,7 @@ usage! {
or |c: &Config| otry!(c.footprint).fat_db.clone(), or |c: &Config| otry!(c.footprint).fat_db.clone(),
flag_scale_verifiers: bool = false, flag_scale_verifiers: bool = false,
or |c: &Config| otry!(c.footprint).scale_verifiers.clone(), or |c: &Config| otry!(c.footprint).scale_verifiers.clone(),
flag_num_verifiers: Option<usize> = None, flag_num_verifiers: Option<usize> = None,
or |c: &Config| otry!(c.footprint).num_verifiers.clone().map(Some), or |c: &Config| otry!(c.footprint).num_verifiers.clone().map(Some),
// -- Import/Export Options // -- Import/Export Options
@ -358,7 +356,6 @@ struct Network {
node_key: Option<String>, node_key: Option<String>,
reserved_peers: Option<String>, reserved_peers: Option<String>,
reserved_only: Option<bool>, reserved_only: Option<bool>,
serve_light: Option<bool>,
} }
#[derive(Default, Debug, PartialEq, RustcDecodable)] #[derive(Default, Debug, PartialEq, RustcDecodable)]
@ -581,7 +578,6 @@ mod tests {
flag_reserved_peers: Some("./path_to_file".into()), flag_reserved_peers: Some("./path_to_file".into()),
flag_reserved_only: false, flag_reserved_only: false,
flag_no_ancient_blocks: false, flag_no_ancient_blocks: false,
flag_serve_light: true,
// -- API and Console Options // -- API and Console Options
// RPC // RPC
@ -760,7 +756,6 @@ mod tests {
node_key: None, node_key: None,
reserved_peers: Some("./path/to/reserved_peers".into()), reserved_peers: Some("./path/to/reserved_peers".into()),
reserved_only: Some(true), reserved_only: Some(true),
serve_light: None,
}), }),
rpc: Some(Rpc { rpc: Some(Rpc {
disable: Some(true), disable: Some(true),

View File

@ -124,7 +124,6 @@ Networking Options:
--max-pending-peers NUM Allow up to NUM pending connections. (default: {flag_max_pending_peers}) --max-pending-peers NUM Allow up to NUM pending connections. (default: {flag_max_pending_peers})
--no-ancient-blocks Disable downloading old blocks after snapshot restoration --no-ancient-blocks Disable downloading old blocks after snapshot restoration
or warp sync. (default: {flag_no_ancient_blocks}) or warp sync. (default: {flag_no_ancient_blocks})
--serve-light Experimental: Serve light client peers. (default: {flag_serve_light})
API and Console Options: API and Console Options:
--no-jsonrpc Disable the JSON-RPC API server. (default: {flag_no_jsonrpc}) --no-jsonrpc Disable the JSON-RPC API server. (default: {flag_no_jsonrpc})

View File

@ -341,7 +341,6 @@ impl Configuration {
no_periodic_snapshot: self.args.flag_no_periodic_snapshot, no_periodic_snapshot: self.args.flag_no_periodic_snapshot,
check_seal: !self.args.flag_no_seal_check, check_seal: !self.args.flag_no_seal_check,
download_old_blocks: !self.args.flag_no_ancient_blocks, download_old_blocks: !self.args.flag_no_ancient_blocks,
serve_light: self.args.flag_serve_light,
verifier_settings: verifier_settings, verifier_settings: verifier_settings,
}; };
Cmd::Run(run_cmd) Cmd::Run(run_cmd)
@ -1032,7 +1031,6 @@ mod tests {
no_periodic_snapshot: false, no_periodic_snapshot: false,
check_seal: true, check_seal: true,
download_old_blocks: true, download_old_blocks: true,
serve_light: false,
verifier_settings: Default::default(), verifier_settings: Default::default(),
})); }));
} }

View File

@ -95,7 +95,6 @@ pub struct RunCmd {
pub no_periodic_snapshot: bool, pub no_periodic_snapshot: bool,
pub check_seal: bool, pub check_seal: bool,
pub download_old_blocks: bool, pub download_old_blocks: bool,
pub serve_light: bool,
pub verifier_settings: VerifierSettings, pub verifier_settings: VerifierSettings,
} }
@ -193,11 +192,6 @@ pub fn execute(cmd: RunCmd, can_restart: bool, logger: Arc<RotatingLogger>) -> R
); );
info!("Operating mode: {}", Colour::White.bold().paint(format!("{}", mode))); info!("Operating mode: {}", Colour::White.bold().paint(format!("{}", mode)));
if cmd.serve_light {
info!("Configured to serve light client peers. Please note this feature is {}.",
Colour::White.bold().paint("experimental".to_string()));
}
// display warning about using experimental journaldb alorithm // display warning about using experimental journaldb alorithm
if !algorithm.is_stable() { if !algorithm.is_stable() {
warn!("Your chosen strategy is {}! You can re-run with --pruning to change.", Colour::Red.bold().paint("unstable")); warn!("Your chosen strategy is {}! You can re-run with --pruning to change.", Colour::Red.bold().paint("unstable"));
@ -217,7 +211,6 @@ pub fn execute(cmd: RunCmd, can_restart: bool, logger: Arc<RotatingLogger>) -> R
sync_config.fork_block = spec.fork_block(); sync_config.fork_block = spec.fork_block();
sync_config.warp_sync = cmd.warp_sync; sync_config.warp_sync = cmd.warp_sync;
sync_config.download_old_blocks = cmd.download_old_blocks; sync_config.download_old_blocks = cmd.download_old_blocks;
sync_config.serve_light = cmd.serve_light;
let passwords = try!(passwords_from_files(&cmd.acc_conf.password_files)); let passwords = try!(passwords_from_files(&cmd.acc_conf.password_files));
@ -295,12 +288,12 @@ pub fn execute(cmd: RunCmd, can_restart: bool, logger: Arc<RotatingLogger>) -> R
// create sync object // create sync object
let (sync_provider, manage_network, chain_notify) = try!(modules::sync( let (sync_provider, manage_network, chain_notify) = try!(modules::sync(
&mut hypervisor, &mut hypervisor,
sync_config, sync_config,
net_conf.into(), net_conf.into(),
client.clone(), client.clone(),
snapshot_service.clone(), snapshot_service.clone(),
client.clone(), client.clone(),
&cmd.logger_config, &cmd.logger_config,
).map_err(|e| format!("Sync error: {}", e))); ).map_err(|e| format!("Sync error: {}", e)));