fix blockchain start

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

View File

@ -105,17 +105,7 @@ Blockchain.prototype.run = function() {
console.error(err);
return;
}
console.error(cmd);
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()});
child.on('error', (err) => {

View File

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