From 63a85d5af11a6b476f210b7250f96bd47f1030e5 Mon Sep 17 00:00:00 2001 From: emizzle Date: Tue, 26 Jun 2018 14:18:55 +1000 Subject: [PATCH] Abandons all storage initialisation routines if storage is disabled in config. --- lib/modules/storage/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/modules/storage/index.js b/lib/modules/storage/index.js index fbcb5d9da..c63bce60f 100644 --- a/lib/modules/storage/index.js +++ b/lib/modules/storage/index.js @@ -17,6 +17,8 @@ class Storage { this._events = options.events; this._logger = options.logger; + if(!this._storageConfig.enabled) return; + // filter list of dapp connections based on available_providers set in config let hasSwarm = _.contains(this._storageConfig.available_providers, 'swarm'); // don't need to eval this in every loop iteration // contains valid dapp storage providers