diff --git a/lib/blockchain.js b/lib/blockchain.js index a8e9c1f97..8d566937f 100644 --- a/lib/blockchain.js +++ b/lib/blockchain.js @@ -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}); diff --git a/lib/geth_commands.js b/lib/geth_commands.js index e3b793198..49d6ff2d0 100644 --- a/lib/geth_commands.js +++ b/lib/geth_commands.js @@ -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) { diff --git a/test/blockchain.js b/test/blockchain.js index 7bc91bfa7..b714a079d 100644 --- a/test/blockchain.js +++ b/test/blockchain.js @@ -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: ""