Merge pull request #408 from ethcore/noinitnodes
Option for no init nodes.
This commit is contained in:
commit
7b47635879
@ -55,13 +55,14 @@ Parity. Ethereum Client.
|
|||||||
Copyright 2015, 2016 Ethcore (UK) Limited
|
Copyright 2015, 2016 Ethcore (UK) Limited
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
parity [options] [ <enode>... ]
|
parity [options] [ --no-bootstrap | <enode>... ]
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--chain CHAIN Specify the blockchain type. CHAIN may be either a JSON chain specification file
|
--chain CHAIN Specify the blockchain type. CHAIN may be either a JSON chain specification file
|
||||||
or frontier, mainnet, morden, or testnet [default: frontier].
|
or frontier, mainnet, morden, or testnet [default: frontier].
|
||||||
-d --db-path PATH Specify the database & configuration directory path [default: $HOME/.parity]
|
-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].
|
--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].
|
--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.
|
--address URL Equivalent to --listen-address URL --public-address URL.
|
||||||
@ -144,11 +145,13 @@ impl Configuration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn init_nodes(&self, spec: &Spec) -> Vec<String> {
|
fn init_nodes(&self, spec: &Spec) -> Vec<String> {
|
||||||
|
if self.args.flag_no_bootstrap { Vec::new() } else {
|
||||||
match self.args.arg_enode.len() {
|
match self.args.arg_enode.len() {
|
||||||
0 => spec.nodes().clone(),
|
0 => spec.nodes().clone(),
|
||||||
_ => self.args.arg_enode.clone(),
|
_ => self.args.arg_enode.clone(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn net_addresses(&self) -> (SocketAddr, SocketAddr) {
|
fn net_addresses(&self) -> (SocketAddr, SocketAddr) {
|
||||||
let listen_address;
|
let listen_address;
|
||||||
|
Loading…
Reference in New Issue
Block a user