support nodiscover option; add warnings to cors settings

This commit is contained in:
Iuri Matias 2016-10-07 07:15:29 -04:00
parent 1080c260a7
commit ab42ae92d5
1 changed files with 11 additions and 3 deletions

View File

@ -95,13 +95,21 @@ GethCommands.prototype.mainCommand = function(address) {
cmd += "--rpcport " + config.rpcPort + " "; cmd += "--rpcport " + config.rpcPort + " ";
cmd += "--rpcaddr " + config.rpcHost + " "; cmd += "--rpcaddr " + config.rpcHost + " ";
if (config.rpcCorsDomain) { 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 + "\" "; cmd += "--rpccorsdomain=\"" + config.rpcCorsDomain + "\" ";
} else { } 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) { if (config.mineWhenNeeded || config.mine) {
cmd += "--mine "; cmd += "--mine ";