Abandons all storage initialisation routines if storage is disabled in config.

This commit is contained in:
emizzle 2018-06-26 14:18:55 +10:00 committed by Iuri Matias
parent 170d8528eb
commit 63a85d5af1
1 changed files with 2 additions and 0 deletions

View File

@ -17,6 +17,8 @@ class Storage {
this._events = options.events; this._events = options.events;
this._logger = options.logger; this._logger = options.logger;
if(!this._storageConfig.enabled) return;
// filter list of dapp connections based on available_providers set in config // 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 let hasSwarm = _.contains(this._storageConfig.available_providers, 'swarm'); // don't need to eval this in every loop iteration
// contains valid dapp storage providers // contains valid dapp storage providers