add support to enable whisper

This commit is contained in:
Iuri Matias 2015-08-09 16:41:42 -04:00
parent 4260122238
commit 4609a21643
2 changed files with 9 additions and 0 deletions

View File

@ -9,6 +9,7 @@ Blockchain.prototype.generate_basic_command = function() {
var address = config.account.address;
var cmd = "geth ";
var rpc_api = ['eth', 'web3'];
if (config.datadir !== "default") {
cmd += "--datadir=\"" + config.datadir + "\" ";
@ -31,6 +32,13 @@ Blockchain.prototype.generate_basic_command = function() {
cmd += "--genesis=\"" + config.genesisBlock + "\" ";
}
if (config.whisper) {
cmd += "--shh ";
rpc_api.push('shh')
}
cmd += '--rpcapi "' + rpc_api.join(',') + '" ';
//TODO: this should be configurable
cmd += "--maxpeers " + config.maxPeers + " ";

View File

@ -45,6 +45,7 @@ BlockchainConfig.prototype.config = function(env) {
port: config.port || "30303",
console_toggle: config.console || false,
mine_when_needed: config.mine_when_needed || false,
whisper: config.whisper || false,
account: config.account
}