From 6bdc9a7eb634036f9a8883f797aea5fab1e3636d Mon Sep 17 00:00:00 2001 From: Arceliar Date: Thu, 7 Jun 2018 21:06:30 -0500 Subject: [PATCH] fix the sim, part of it bypasses queues so it's expected to see loops in those cases while things are in the middle of updating --- misc/sim/treesim.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/misc/sim/treesim.go b/misc/sim/treesim.go index 83548e81..0316b8fd 100644 --- a/misc/sim/treesim.go +++ b/misc/sim/treesim.go @@ -162,7 +162,9 @@ func testPaths(store map[[32]byte]*Node) bool { for here := source; here != dest; { temp++ if temp > 4096 { - panic("Loop?") + fmt.Println("Loop?") + time.Sleep(time.Second) + return false } nextPort := here.core.DEBUG_switchLookup(coords) // First check if "here" is accepting packets from the previous node @@ -195,7 +197,7 @@ func testPaths(store map[[32]byte]*Node) bool { source.index, source.core.DEBUG_getLocator(), here.index, here.core.DEBUG_getLocator(), dest.index, dest.core.DEBUG_getLocator()) - here.core.DEBUG_getSwitchTable().DEBUG_dumpTable() + //here.core.DEBUG_getSwitchTable().DEBUG_dumpTable() } if here != source { // This is sufficient to check for routing loops or blackholes