mirror of https://github.com/embarklabs/embark.git
option added
This commit is contained in:
parent
eb36af87b0
commit
03a6b6c48d
|
@ -22,7 +22,9 @@ var Blockchain = function(blockchainConfig, Client) {
|
|||
account: this.blockchainConfig.account || {},
|
||||
whisper: (this.blockchainConfig.whisper === undefined) || this.blockchainConfig.whisper,
|
||||
maxpeers: ((this.blockchainConfig.maxpeers === 0) ? 0 : (this.blockchainConfig.maxpeers || 25)),
|
||||
bootnodes: this.blockchainConfig.bootnodes || ""
|
||||
bootnodes: this.blockchainConfig.bootnodes || "",
|
||||
rpcApi: (this.blockchainConfig.rpcApi || ['eth', 'web3', 'net']),
|
||||
vmdebug: this.blockchainConfig.vmdebug || false
|
||||
};
|
||||
|
||||
this.client = new Client({config: this.config});
|
||||
|
|
|
@ -49,7 +49,7 @@ GethCommands.prototype.listAccountsCommand = function() {
|
|||
GethCommands.prototype.mainCommand = function(address) {
|
||||
var config = this.config;
|
||||
var cmd = "geth ";
|
||||
var rpc_api = ['eth', 'web3'];
|
||||
var rpc_api = (this.config.rpcApi || ['eth', 'web3', 'net']);
|
||||
|
||||
cmd += this.commonOptions();
|
||||
|
||||
|
@ -74,6 +74,10 @@ GethCommands.prototype.mainCommand = function(address) {
|
|||
cmd += "--nodiscover ";
|
||||
}
|
||||
|
||||
if (config.vmdebug) {
|
||||
cmd += "--vmdebug ";
|
||||
}
|
||||
|
||||
cmd += "--maxpeers " + config.maxpeers + " ";
|
||||
|
||||
if (config.mineWhenNeeded || config.mine) {
|
||||
|
|
|
@ -18,12 +18,14 @@ describe('embark.Blockchain', function() {
|
|||
mineWhenNeeded: false,
|
||||
rpcHost: 'localhost',
|
||||
rpcPort: 8545,
|
||||
rpcApi: ['eth', 'web3', 'net'],
|
||||
rpcCorsDomain: false,
|
||||
networkId: 12301,
|
||||
port: 30303,
|
||||
nodiscover: false,
|
||||
maxpeers: 25,
|
||||
mine: false,
|
||||
vmdebug: false,
|
||||
whisper: true,
|
||||
account: {},
|
||||
bootnodes: ""
|
||||
|
@ -43,12 +45,14 @@ describe('embark.Blockchain', function() {
|
|||
mineWhenNeeded: true,
|
||||
rpcHost: 'someserver',
|
||||
rpcPort: 12345,
|
||||
rpcApi: ['eth', 'web3', 'net'],
|
||||
rpcCorsDomain: true,
|
||||
networkId: 1,
|
||||
port: 123456,
|
||||
nodiscover: true,
|
||||
maxpeers: 25,
|
||||
mine: true,
|
||||
vmdebug: false,
|
||||
whisper: false,
|
||||
account: {},
|
||||
bootnodes: ""
|
||||
|
|
Loading…
Reference in New Issue