Skip to content

Commit

Permalink
algorithm halts after line 9 but loop route conflict found
Browse files Browse the repository at this point in the history
  • Loading branch information
michielbdejong committed Sep 18, 2024
1 parent b8d6182 commit e31d7bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ async function run(): Promise<void> {
// console.log('storing', loopId, from, nodeId);
loops[loopId][from] = nodeId;
} else if (loops[loopId][from] !== nodeId) {
console.log('loop route conflict!');
console.log(`loop route conflict! ${loopId} goes from ${from} to both ${loops[loopId][from]} and ${nodeId}`);
}
if (typeof loops[loopId][nodeId] === 'undefined') {
// console.log('storing', loopId, nodeId, to);
loops[loopId][nodeId] = to;
} else if (loops[loopId][nodeId] !== to) {
console.log('loop route conflict!');
console.log(`loop route conflict! ${loopId} goes from ${nodeId} to both ${loops[loopId][nodeId]} and ${to}`);
}
});
});
Expand Down

0 comments on commit e31d7bb

Please sign in to comment.