From 10f7d21f81c612bd748aa5d356028b7dfde9decb Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Mon, 2 Apr 2018 14:44:55 -0400 Subject: [PATCH] fix tests, enable blockchain component by default --- lib/core/config.js | 8 +++++--- templates/simple/embark.json | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/core/config.js b/lib/core/config.js index 185080571..c6aafe594 100644 --- a/lib/core/config.js +++ b/lib/core/config.js @@ -63,10 +63,10 @@ Config.prototype.reloadConfig = function() { this.loadChainTrackerFile(); }; -Config.prototype._mergeConfig = function(configFilePath, defaultConfig, env) { +Config.prototype._mergeConfig = function(configFilePath, defaultConfig, env, enabledByDefault) { if (!configFilePath) { let configToReturn = defaultConfig['default'] || {}; - configToReturn.enabled = false; + configToReturn.enabled = enabledByDefault || false; return configToReturn; } @@ -102,7 +102,9 @@ Config.prototype.loadBlockchainConfigFile = function() { } }; - this.blockchainConfig = this._mergeConfig("blockchain.json", configObject, this.env); + let configFilePath = this._getFileOrOject(this.configDir, 'blockchain.json', 'blockchain'); + + this.blockchainConfig = this._mergeConfig(configFilePath, configObject, this.env, true); }; Config.prototype.loadContractsConfigFile = function() { diff --git a/templates/simple/embark.json b/templates/simple/embark.json index a99cbf7b5..dafbbdb23 100644 --- a/templates/simple/embark.json +++ b/templates/simple/embark.json @@ -4,6 +4,7 @@ "buildDir": "build/", "config": { "contracts": "contracts.json", + "blockchain": false, "storage": false, "communication": false, "webserver": false