From 5c5715d480ce4244b345d72506ead24564645539 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Thu, 23 Aug 2018 12:38:54 -0400 Subject: [PATCH] rebase fixes --- lib/modules/contracts_manager/index.js | 38 -------------------------- 1 file changed, 38 deletions(-) diff --git a/lib/modules/contracts_manager/index.js b/lib/modules/contracts_manager/index.js index 8d40b1c4..6b1b25ee 100644 --- a/lib/modules/contracts_manager/index.js +++ b/lib/modules/contracts_manager/index.js @@ -1,4 +1,3 @@ -/*global web3*/ let toposort = require('toposort'); let async = require('async'); const cloneDeep = require('clone-deep'); @@ -405,43 +404,6 @@ class ContractsManager { } } callback(); - }, - function setDependencyCount(callback) { - let className; - - function getDependencyCount(contractName, cycleDetector) { - if (!self.contracts[contractName]) { - return 0; - } - if (self.contracts[contractName].dependencyCount || self.contracts[contractName].dependencyCount === 0) { - // Already have that count - return self.contracts[contractName].dependencyCount; - } - if (!self.contractDependencies[contractName] || !self.contractDependencies[contractName].length) { - self.contracts[contractName].dependencyCount = 0; - return 0; - } - let total = self.contractDependencies[contractName].length; - self.contractDependencies[contractName].some(dependencyName => { - if (cycleDetector.indexOf(dependencyName) > -1) { - // We are in a cycle because of the dependency, set both to Infinity - self.contracts[dependencyName].dependencyCount = Infinity; - total = Infinity; - return true; - } - cycleDetector.push(dependencyName); - total += getDependencyCount(dependencyName, cycleDetector); - }); - self.contracts[contractName].dependencyCount = total; - return total; - } - - let cycleDetector; - for (className in self.contracts) { - cycleDetector = []; - getDependencyCount(className, cycleDetector); - } - callback(); } ], function (err) { if (err) {