From ab42ae92d5d65a24a9117aa6435fb529f8da7c85 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Fri, 7 Oct 2016 07:15:29 -0400 Subject: [PATCH] support nodiscover option; add warnings to cors settings --- lib/geth_commands.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/geth_commands.js b/lib/geth_commands.js index 0d2b3a04..9b81fd7b 100644 --- a/lib/geth_commands.js +++ b/lib/geth_commands.js @@ -95,13 +95,21 @@ GethCommands.prototype.mainCommand = function(address) { cmd += "--rpcport " + config.rpcPort + " "; cmd += "--rpcaddr " + config.rpcHost + " "; if (config.rpcCorsDomain) { - // TODO: show gigantic warning when cors is set to * + if (config.rpcCorsDomain === '*') { + console.log('=================================='); + console.log('make sure you know what you are doing'); + console.log('=================================='); + } cmd += "--rpccorsdomain=\"" + config.rpcCorsDomain + "\" "; } else { - // TODO: show warning when cors is not set + console.log('=================================='); + console.log('warning: cors is not set'); + console.log('=================================='); } - //"nodiscover": true, + if (config.nodiscover) { + cmd += "--nodiscover "; + } if (config.mineWhenNeeded || config.mine) { cmd += "--mine ";