fix blockchain start

This commit is contained in:
Jonathan Rainville 2018-05-28 10:16:07 -04:00
parent 4e20e82edf
commit d36af9f5e1
2 changed files with 6 additions and 16 deletions

View File

@ -105,17 +105,7 @@ Blockchain.prototype.run = function() {
console.error(err); console.error(err);
return; return;
} }
console.error(cmd);
args = _.compact(args); args = _.compact(args);
/*cmd = cmd.replace(/"/g, '').split(' --');
let args = _.compact(cmd.splice(1)).map(arg => {
return '--' + arg;
});
console.error('CMD', cmd[0]);*/
console.error('ARGS', args);
console.log('CWD', process.cwd());
const child = child_process.spawn(cmd, args, {cwd: process.cwd()}); const child = child_process.spawn(cmd, args, {cwd: process.cwd()});
child.on('error', (err) => { child.on('error', (err) => {

View File

@ -88,7 +88,7 @@ class GethCommands {
console.log(__('make sure you know what you are doing')); console.log(__('make sure you know what you are doing'));
console.log('=================================='); console.log('==================================');
} }
cmd.push("--rpccorsdomain=\"" + config.rpcCorsDomain + "\""); cmd.push("--rpccorsdomain=" + config.rpcCorsDomain);
} else { } else {
console.log('=================================='); console.log('==================================');
console.log(__('warning: cors is not set')); console.log(__('warning: cors is not set'));
@ -112,7 +112,7 @@ class GethCommands {
console.log(__('make sure you know what you are doing')); console.log(__('make sure you know what you are doing'));
console.log('=================================='); console.log('==================================');
} }
cmd.push("--wsorigins=\"" + config.wsOrigins + "\""); cmd.push("--wsorigins=" + config.wsOrigins);
} else { } else {
console.log('=================================='); console.log('==================================');
console.log(__('warning: wsOrigins is not set')); console.log(__('warning: wsOrigins is not set'));
@ -192,12 +192,12 @@ class GethCommands {
callback(""); callback("");
}, },
function rpcApi(callback) { function rpcApi(callback) {
args.push('--rpcapi="' + rpc_api.join(',') + '"'); args.push('--rpcapi=' + rpc_api.join(','));
callback(null, '--rpcapi="' + rpc_api.join(',') + '"'); callback(null, '--rpcapi=' + rpc_api.join(','));
}, },
function wsApi(callback) { function wsApi(callback) {
args.push('--wsapi="' + ws_api.join(',') + '"'); args.push('--wsapi=' + ws_api.join(','));
callback(null, '--wsapi="' + ws_api.join(',') + '"'); callback(null, '--wsapi=' + ws_api.join(','));
}, },
function accountToUnlock(callback) { function accountToUnlock(callback) {
let accountAddress = ""; let accountAddress = "";