diff --git a/lib/cmds/blockchain/blockchain.js b/lib/cmds/blockchain/blockchain.js index 81785d1b..56b43b5a 100644 --- a/lib/cmds/blockchain/blockchain.js +++ b/lib/cmds/blockchain/blockchain.js @@ -7,7 +7,6 @@ var GethCommands = require('./geth_commands.js'); /*eslint complexity: ["error", 35]*/ var Blockchain = function(options) { this.blockchainConfig = options.blockchainConfig; - this.accountsConfig = options.accountsConfig; this.env = options.env || 'development'; this.client = options.client; this.isDev = options.isDev; @@ -42,8 +41,7 @@ var Blockchain = function(options) { vmdebug: this.blockchainConfig.vmdebug || false, targetGasLimit: this.blockchainConfig.targetGasLimit || false, light: this.blockchainConfig.light || false, - fast: this.blockchainConfig.fast || false, - accountsConfig: this.accountsConfig + fast: this.blockchainConfig.fast || false }; if (this.blockchainConfig === {} || JSON.stringify(this.blockchainConfig) === '{"enabled":true}') { @@ -126,9 +124,9 @@ Blockchain.prototype.initChainAndGetAddress = function() { return address; }; -var BlockchainClient = function(blockchainConfig, accountsConfig, client, env, isDev) { +var BlockchainClient = function(blockchainConfig, client, env, isDev) { if (client === 'geth') { - return new Blockchain({blockchainConfig, accountsConfig, client: GethCommands, env, isDev}); + return new Blockchain({blockchainConfig, client: GethCommands, env, isDev}); } else { throw new Error('unknown client'); } diff --git a/lib/i18n/locales/en.json b/lib/i18n/locales/en.json index 064f90df..81f2aa87 100644 --- a/lib/i18n/locales/en.json +++ b/lib/i18n/locales/en.json @@ -101,5 +101,8 @@ "downloading {{packageName}} {{version}}....": "downloading {{packageName}} {{version}}....", "Swarm node is offline...": "Swarm node is offline...", "Swarm node detected...": "Swarm node detected...", - "Ethereum node (version unknown)": "Ethereum node (version unknown)" + "Ethereum node (version unknown)": "Ethereum node (version unknown)", + "No Blockchain node found": "No Blockchain node found", + "Couldn't connect to an Ethereum node are you sure it's on?": "Couldn't connect to an Ethereum node are you sure it's on?", + "make sure you have an Ethereum node or simulator running. e.g '%s'": "make sure you have an Ethereum node or simulator running. e.g '%s'" } \ No newline at end of file diff --git a/lib/index.js b/lib/index.js index 6a2e7d2e..00dcb5f4 100644 --- a/lib/index.js +++ b/lib/index.js @@ -61,7 +61,7 @@ class Embark { if(webServerConfig) blockchainConfig.wsOrigins = `http://${webServerConfig.host}:${webServerConfig.port}`; if(storageConfig) blockchainConfig.wsOrigins += `${blockchainConfig.wsOrigins.length ? ',' : ''}${storageConfig.protocol}://${storageConfig.host}:${storageConfig.port}`; } - return require('./cmds/blockchain/blockchain.js')(blockchainConfig, this.config.contractsConfig.deployment.accounts, client, env, this.isDev(env)).run(); + return require('./cmds/blockchain/blockchain.js')(blockchainConfig, client, env, this.isDev(env)).run(); } simulator(options) { diff --git a/test/blockchain.js b/test/blockchain.js index af09cdac..bcb48d08 100644 --- a/test/blockchain.js +++ b/test/blockchain.js @@ -15,7 +15,6 @@ describe('embark.Blockchain', function () { let config = { networkType: 'custom', genesisBlock: false, - accountsConfig: {}, geth_bin: 'geth', datadir: false, mineWhenNeeded: false, @@ -32,7 +31,7 @@ describe('embark.Blockchain', function () { whisper: true, account: {}, bootnodes: "", - wsApi: [ "eth", "web3", "net", "shh" ], + wsApi: ["eth", "web3", "net", "shh"], wsHost: "localhost", wsOrigins: false, wsPort: 8546, @@ -41,7 +40,7 @@ describe('embark.Blockchain', function () { fast: false, light: false }; - let blockchain = new Blockchain(config, {}, 'geth'); + let blockchain = new Blockchain(config, 'geth'); assert.deepEqual(blockchain.config, config); done(); @@ -55,7 +54,6 @@ describe('embark.Blockchain', function () { genesisBlock: 'foo/bar/genesis.json', geth_bin: 'geth', datadir: '/foo/datadir/', - accountsConfig: {}, mineWhenNeeded: true, rpcHost: 'someserver', rpcPort: 12345, @@ -70,7 +68,7 @@ describe('embark.Blockchain', function () { whisper: false, account: {}, bootnodes: "", - wsApi: [ "eth", "web3", "net", "shh" ], + wsApi: ["eth", "web3", "net", "shh"], wsHost: "localhost", wsOrigins: false, wsPort: 8546, @@ -79,7 +77,7 @@ describe('embark.Blockchain', function () { fast: false, light: false }; - let blockchain = new Blockchain(config, {}, 'geth'); + let blockchain = new Blockchain(config, 'geth'); assert.deepEqual(blockchain.config, config); done();