Update main.rs
This commit is contained in:
parent
01d9ffcd9b
commit
3575e6bbc1
@ -67,7 +67,7 @@ Options:
|
|||||||
--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.
|
||||||
--upnp Use UPnP to try to figure out the correct network settings.
|
--upnp Use UPnP to try to figure out the correct network settings.
|
||||||
--net-key KEY Specify node secret key as hex string.
|
--node-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-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].
|
--cache-max-size BYTES Specify the maximum size of the blockchain cache in bytes [default: 262144].
|
||||||
@ -78,7 +78,7 @@ Options:
|
|||||||
-l --logging LOGGING Specify the logging level.
|
-l --logging LOGGING Specify the logging level.
|
||||||
-v --version Show information about version.
|
-v --version Show information about version.
|
||||||
-h --help Show this screen.
|
-h --help Show this screen.
|
||||||
", flag_cache_pref_size: usize, flag_cache_max_size: usize, flag_address: Option<String>, flag_net_key: Option<String>);
|
", flag_cache_pref_size: usize, flag_cache_max_size: usize, flag_address: Option<String>, flag_node_key: Option<String>);
|
||||||
|
|
||||||
fn setup_log(init: &str) {
|
fn setup_log(init: &str) {
|
||||||
let mut builder = LogBuilder::new();
|
let mut builder = LogBuilder::new();
|
||||||
@ -206,7 +206,7 @@ fn main() {
|
|||||||
let (listen, public) = conf.net_addresses();
|
let (listen, public) = conf.net_addresses();
|
||||||
net_settings.listen_address = listen;
|
net_settings.listen_address = listen;
|
||||||
net_settings.public_address = public;
|
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"));
|
net_settings.use_secret = conf.args.flag_node_key.as_ref().map(|s| Secret::from_str(&s).expect("Invalid key string"));
|
||||||
|
|
||||||
// Build client
|
// Build client
|
||||||
let mut service = ClientService::start(spec, net_settings, &Path::new(&conf.path())).unwrap();
|
let mut service = ClientService::start(spec, net_settings, &Path::new(&conf.path())).unwrap();
|
||||||
|
Loading…
Reference in New Issue
Block a user