Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Rename to warp barrier.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomusdrw committed Mar 28, 2018
1 parent cd3f8db commit 678f18c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions parity/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -393,9 +393,9 @@ usage! {
"--no-serve-light",
"Disable serving of light peers.",

ARG arg_warp_after: (Option<u64>) = 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<u64>) = 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]",
Expand Down Expand Up @@ -1048,7 +1048,7 @@ struct Ui {
#[serde(deny_unknown_fields)]
struct Network {
warp: Option<bool>,
warp_after: Option<u64>,
warp_barrier: Option<u64>,
port: Option<u16>,
min_peers: Option<u16>,
max_peers: Option<u16>,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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),
Expand Down
4 changes: 2 additions & 2 deletions parity/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()?,
Expand Down Expand Up @@ -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(),
Expand Down
4 changes: 2 additions & 2 deletions parity/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ pub struct RunCmd {
pub net_conf: ethsync::NetworkConfiguration,
pub network_id: Option<u64>,
pub warp_sync: bool,
pub warp_after: Option<u64>,
pub warp_barrier: Option<u64>,
pub public_node: bool,
pub acc_conf: AccountsConfig,
pub gas_pricer_conf: GasPricerConfig,
Expand Down Expand Up @@ -528,7 +528,7 @@ pub fn execute_impl(cmd: RunCmd, can_restart: bool, logger: Arc<RotatingLogger>)
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,
Expand Down

0 comments on commit 678f18c

Please sign in to comment.