add support to enable whisper
This commit is contained in:
parent
4260122238
commit
4609a21643
|
@ -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 + " ";
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue