Skip to content
Snippets Groups Projects
Commit 22a446a6 authored by Vincent Rousseau's avatar Vincent Rousseau Committed by Stéphane Veyret
Browse files

Small fixes #1215

parent 02fe3188
No related branches found
No related tags found
1 merge request!1224Add startup scripts
...@@ -16,8 +16,8 @@ export const WS2PDependency = { ...@@ -16,8 +16,8 @@ export const WS2PDependency = {
cliOptions: [ cliOptions: [
{ value: '--ws2p-upnp', desc: 'Use UPnP to open remote port.' }, { value: '--ws2p-upnp', desc: 'Use UPnP to open remote port.' },
{ value: '--ws2p-noupnp', desc: 'Do not use UPnP to open remote port.' }, { value: '--ws2p-noupnp', desc: 'Do not use UPnP to open remote port.' },
{ value: '--ws2p-host <host>', desc: 'Port to listen to.' }, { value: '--ws2p-host <host>', desc: 'Host to listen to.' },
{ value: '--ws2p-port <port>', desc: 'Host to listen to.', parser: (val:string) => parseInt(val) }, { value: '--ws2p-port <port>', desc: 'Port to listen to.', parser: (val:string) => parseInt(val) },
{ value: '--ws2p-remote-host <address>', desc: 'Availabily host.' }, { value: '--ws2p-remote-host <address>', desc: 'Availabily host.' },
{ value: '--ws2p-remote-port <port>', desc: 'Availabily port.', parser: (val:string) => parseInt(val) }, { value: '--ws2p-remote-port <port>', desc: 'Availabily port.', parser: (val:string) => parseInt(val) },
{ value: '--ws2p-remote-path <path>', desc: 'Availabily web path.' }, { value: '--ws2p-remote-path <path>', desc: 'Availabily web path.' },
......
...@@ -500,6 +500,7 @@ function commandLineConf(program:any, conf:any = {}) { ...@@ -500,6 +500,7 @@ function commandLineConf(program:any, conf:any = {}) {
if (cli.currency) conf.currency = cli.currency; if (cli.currency) conf.currency = cli.currency;
if (cli.server.port) conf.port = cli.server.port; if (cli.server.port) conf.port = cli.server.port;
if (cli.cpu) conf.cpu = Math.max(0.01, Math.min(1.0, cli.cpu)); if (cli.cpu) conf.cpu = Math.max(0.01, Math.min(1.0, cli.cpu));
if (cli.nbCores) conf.nbCores = Math.max(1, Math.min(ProverConstants.CORES_MAXIMUM_USE_IN_PARALLEL, cli.nbCores));
if (cli.prefix) conf.prefix = Math.max(ProverConstants.MIN_PEER_ID, Math.min(ProverConstants.MAX_PEER_ID, cli.prefix)); if (cli.prefix) conf.prefix = Math.max(ProverConstants.MIN_PEER_ID, Math.min(ProverConstants.MAX_PEER_ID, cli.prefix));
if (cli.logs.http) conf.httplogs = true; if (cli.logs.http) conf.httplogs = true;
if (cli.logs.nohttp) conf.httplogs = false; if (cli.logs.nohttp) conf.httplogs = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment