diff --git a/lib/core/config.js b/lib/core/config.js index 90a967ccc..e50d0e927 100644 --- a/lib/core/config.js +++ b/lib/core/config.js @@ -206,7 +206,8 @@ Config.prototype.loadBlockchainConfigFile = function() { "default": { "enabled": true, "rpcCorsDomain": "auto", - "wsOrigins": "auto" + "wsOrigins": "auto", + "proxy": true } }; diff --git a/lib/modules/blockchain_process/blockchain.js b/lib/modules/blockchain_process/blockchain.js index 419b8a44b..f7886b529 100644 --- a/lib/modules/blockchain_process/blockchain.js +++ b/lib/modules/blockchain_process/blockchain.js @@ -12,7 +12,7 @@ const Ipc = require('../../core/ipc'); const {defaultHost, dockerHostSwap} = require('../../utils/host'); const Logger = require('../../core/logger'); -// time between IPC connection attmpts (in ms) +// time between IPC connection attempts (in ms) const IPC_CONNECT_INTERVAL = 2000; /*eslint complexity: ["error", 42]*/ @@ -60,7 +60,7 @@ var Blockchain = function(userConfig, clientClass) { targetGasLimit: this.userConfig.targetGasLimit || false, syncMode: this.userConfig.syncMode || this.userConfig.syncmode, verbosity: this.userConfig.verbosity, - proxy: this.userConfig.proxy || true + proxy: this.userConfig.proxy }; if (this.userConfig === {} || this.userConfig.default || JSON.stringify(this.userConfig) === '{"enabled":true}') { diff --git a/test/blockchain.js b/test/blockchain.js index 3bd90e578..f4ebaa3ba 100644 --- a/test/blockchain.js +++ b/test/blockchain.js @@ -41,12 +41,9 @@ describe('embark.Blockchain', function() { targetGasLimit: false, syncMode: undefined, verbosity: undefined, - proxy: true, + proxy: undefined, silent: undefined }; - // We check also proxy's ports because proxy is set to true - expectedConfig.wsPort += constants.blockchain.servicePortOnProxy; - expectedConfig.rpcPort += constants.blockchain.servicePortOnProxy; assert.deepEqual(blockchain.config, expectedConfig); done(); diff --git a/test/config.js b/test/config.js index ca7202aeb..6aa88a0a4 100644 --- a/test/config.js +++ b/test/config.js @@ -25,6 +25,7 @@ describe('embark.Config', function () { "isDev": false, "mineWhenNeeded": true, "nodiscover": true, + "proxy": true, "rpcHost": "localhost", "rpcPort": 8545, "rpcCorsDomain": "http://localhost:8000", @@ -48,6 +49,7 @@ describe('embark.Config', function () { "gasPrice": "8000000", "mineWhenNeeded": true, "nodiscover": true, + "proxy": true, "rpcHost": "localhost", "rpcPort": 8545, "rpcCorsDomain": "http://localhost:8000", @@ -81,6 +83,7 @@ describe('embark.Config', function () { "gasPrice": "8000000", "mineWhenNeeded": true, "nodiscover": true, + "proxy": true, "rpcHost": "localhost", "rpcPort": 8545, "rpcCorsDomain": "http://localhost:8000",