net-key option

This commit is contained in:
arkpar 2016-02-11 14:08:52 +01:00
parent 7bb661e21c
commit 6281d18227
1 changed files with 3 additions and 1 deletions

View File

@ -66,6 +66,7 @@ Options:
--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.
--upnp Use UPnP to try to figure out the correct network settings.
--net-key KEY Specify node secret key as hex string.
--cache-pref-size BYTES Specify the prefered size of the blockchain cache in bytes [default: 16384].
--cache-max-size BYTES Specify the maximum size of the blockchain cache in bytes [default: 262144].
@ -76,7 +77,7 @@ Options:
-l --logging LOGGING Specify the logging level.
-v --version Show information about version.
-h --help Show this screen.
", flag_cache_pref_size: usize, flag_cache_max_size: usize, flag_address: Option<String>);
", flag_cache_pref_size: usize, flag_cache_max_size: usize, flag_address: Option<String>, flag_net_key: Option<String>);
fn setup_log(init: &str) {
let mut builder = LogBuilder::new();
@ -202,6 +203,7 @@ fn main() {
let (listen, public) = conf.net_addresses();
net_settings.listen_address = listen;
net_settings.public_address = public;
net_settings.use_secret = conf.args.flag_net_key.as_ref().map(|s| Secret::from_str(&s).expect("Invalid key string"));
// Build client
let mut service = ClientService::start(spec, net_settings, &Path::new(&conf.path())).unwrap();