fix cyclic error when contract is actually just referring to itself

This commit is contained in:
Iuri Matias 2017-12-28 08:26:02 -05:00
parent 1f95418504
commit 36d7890cfc

View File

@ -207,7 +207,7 @@ class ContractsManager {
let orderedDependencies;
try {
orderedDependencies = toposort(converted_dependencies).reverse();
orderedDependencies = toposort(converted_dependencies.filter((x) => x[0] != x[1])).reverse();
} catch(e) {
this.logger.error(("Error: " + e.message).red);
this.logger.error("there are two or more contracts that depend on each other in a cyclic manner".bold.red);