From 678f18c7d864bf9ee95a2e8286bf689f77d61aa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Wed, 28 Mar 2018 17:51:35 +0200 Subject: [PATCH] Rename to warp barrier. --- parity/cli/mod.rs | 12 ++++++------ parity/configuration.rs | 4 ++-- parity/run.rs | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/parity/cli/mod.rs b/parity/cli/mod.rs index f2317f430dd..691bdd6144c 100644 --- a/parity/cli/mod.rs +++ b/parity/cli/mod.rs @@ -393,9 +393,9 @@ usage! { "--no-serve-light", "Disable serving of light peers.", - ARG arg_warp_after: (Option) = None, or |c: &Config| c.network.as_ref()?.warp_after.clone(), - "--warp-after=[NUM]", - "When warp enabled only try to warp to a snapshot after block NUM. Never falls back to regular sync until this block is reached.", + ARG arg_warp_barrier: (Option) = None, or |c: &Config| c.network.as_ref()?.warp_barrier.clone(), + "--warp-barrier=[NUM]", + "When warp enabled never attempt regular sync before warping to block NUM.", ARG arg_port: (u16) = 30303u16, or |c: &Config| c.network.as_ref()?.port.clone(), "--port=[PORT]", @@ -1048,7 +1048,7 @@ struct Ui { #[serde(deny_unknown_fields)] struct Network { warp: Option, - warp_after: Option, + warp_barrier: Option, port: Option, min_peers: Option, max_peers: Option, @@ -1630,7 +1630,7 @@ mod tests { flag_geth: false, flag_testnet: false, flag_import_geth_keys: false, - arg_warp_after: None, + arg_warp_barrier: None, arg_datadir: None, arg_networkid: None, arg_peers: None, @@ -1736,7 +1736,7 @@ mod tests { }), network: Some(Network { warp: Some(false), - warp_after: None, + warp_barrier: None, port: None, min_peers: Some(10), max_peers: Some(20), diff --git a/parity/configuration.rs b/parity/configuration.rs index 7a53fae5b3e..bff8390391f 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -368,7 +368,7 @@ impl Configuration { wal: wal, vm_type: vm_type, warp_sync: warp_sync, - warp_after: self.args.arg_warp_after, + warp_barrier: self.args.arg_warp_barrier, public_node: public_node, geth_compatibility: geth_compatibility, net_settings: self.network_settings()?, @@ -1402,7 +1402,7 @@ mod tests { network_id: None, public_node: false, warp_sync: true, - warp_after: None, + warp_barrier: None, acc_conf: Default::default(), gas_pricer_conf: Default::default(), miner_extras: Default::default(), diff --git a/parity/run.rs b/parity/run.rs index db0a5ddcefb..e7fb41cd7e1 100644 --- a/parity/run.rs +++ b/parity/run.rs @@ -101,7 +101,7 @@ pub struct RunCmd { pub net_conf: ethsync::NetworkConfiguration, pub network_id: Option, pub warp_sync: bool, - pub warp_after: Option, + pub warp_barrier: Option, pub public_node: bool, pub acc_conf: AccountsConfig, pub gas_pricer_conf: GasPricerConfig, @@ -528,7 +528,7 @@ pub fn execute_impl(cmd: RunCmd, can_restart: bool, logger: Arc) warp_sync = false; } } - sync_config.warp_sync = match (warp_sync, cmd.warp_after) { + sync_config.warp_sync = match (warp_sync, cmd.warp_barrier) { (true, Some(block)) => ethsync::WarpSync::OnlyAndAfter(block), (true, _) => ethsync::WarpSync::Enabled, _ => ethsync::WarpSync::Disabled,