From 559f524c4405280ad8eaeaae14af3f3ab81606bd Mon Sep 17 00:00:00 2001
From: Vincent Rousseau <vincent.rousseau@irstea.fr>
Date: Sat, 2 Dec 2017 22:39:22 +0100
Subject: [PATCH] Small fixes #1215

---
 app/modules/prover/lib/proof.ts | 2 +-
 app/modules/ws2p/index.ts       | 4 ++--
 index.ts                        | 1 +
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/app/modules/prover/lib/proof.ts b/app/modules/prover/lib/proof.ts
index 9b15c0be5..2108984c7 100644
--- a/app/modules/prover/lib/proof.ts
+++ b/app/modules/prover/lib/proof.ts
@@ -217,7 +217,7 @@ function beginNewProofOfWork(stuff:any) {
              ****************/
             // We wait for a maximum time of `turnDuration`.
             // This will trigger the end of the turn by the concurrent race I. During that time, the proof.js script
-            // just does nothing: this gives of a bit of breath to the CPU. Tthe amount of "breath" depends on the "cpu"
+            // just does nothing: this gives of a bit of breath to the CPU. The amount of "breath" depends on the "cpu"
             // parameter.
             await countDown(turnDuration);
           }
diff --git a/app/modules/ws2p/index.ts b/app/modules/ws2p/index.ts
index a54d265f1..c91451e46 100644
--- a/app/modules/ws2p/index.ts
+++ b/app/modules/ws2p/index.ts
@@ -16,8 +16,8 @@ export const WS2PDependency = {
     cliOptions: [
       { value: '--ws2p-upnp',                  desc: '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-port <port>',           desc: 'Host to listen to.', parser: (val:string) => parseInt(val) },
+      { value: '--ws2p-host <host>',           desc: 'Host to listen to.' },
+      { 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-port <port>',    desc: 'Availabily port.', parser: (val:string) => parseInt(val) },
       { value: '--ws2p-remote-path <path>',    desc: 'Availabily web path.' },
diff --git a/index.ts b/index.ts
index ecf7be9d6..7563b2057 100644
--- a/index.ts
+++ b/index.ts
@@ -486,6 +486,7 @@ function commandLineConf(program:any, conf:any = {}) {
   if (cli.currency)                             conf.currency = cli.currency;
   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.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.logs.http)                            conf.httplogs = true;
   if (cli.logs.nohttp)                          conf.httplogs = false;
-- 
GitLab