From 439e99d32b90e3bb130911dab316bcb5ff326a22 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Thu, 11 Feb 2016 10:46:55 +0100 Subject: [PATCH] Option for no init nodes. --- parity/main.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/parity/main.rs b/parity/main.rs index 5627f87f0..ef1d1a329 100644 --- a/parity/main.rs +++ b/parity/main.rs @@ -55,13 +55,14 @@ Parity. Ethereum Client. Copyright 2015, 2016 Ethcore (UK) Limited Usage: - parity [options] [ ... ] + parity [options] [ --no-bootstrap | ... ] Options: --chain CHAIN Specify the blockchain type. CHAIN may be either a JSON chain specification file or frontier, mainnet, morden, or testnet [default: frontier]. -d --db-path PATH Specify the database & configuration directory path [default: $HOME/.parity] + --no-bootstrap Don't bother trying to connect to any nodes initially. --listen-address URL Specify the IP/port on which to listen for peers [default: 0.0.0.0:30304]. --public-address URL Specify the IP/port on which peers may connect [default: 0.0.0.0:30304]. --address URL Equivalent to --listen-address URL --public-address URL. @@ -144,9 +145,11 @@ impl Configuration { } fn init_nodes(&self, spec: &Spec) -> Vec { - match self.args.arg_enode.len() { - 0 => spec.nodes().clone(), - _ => self.args.arg_enode.clone(), + if self.args.flag_no_bootstrap { Vec::new() } else { + match self.args.arg_enode.len() { + 0 => spec.nodes().clone(), + _ => self.args.arg_enode.clone(), + } } }