add some debug output and get things to start working in the sim

This commit is contained in:
Arceliar 2018-10-20 15:21:40 -05:00
parent 03a88fe304
commit 1720dff476
3 changed files with 23 additions and 18 deletions

View file

@ -229,14 +229,10 @@ func DEBUG_wire_encode_coords(coords []byte) []byte {
// DHT, via core
func (c *Core) DEBUG_getDHTSize() int {
total := 0
/* FIXME
for bidx := 0; bidx < c.dht.nBuckets(); bidx++ {
b := c.dht.getBucket(bidx)
total += len(b.peers)
total += len(b.other)
}
*/
var total int
c.router.doAdmin(func() {
total = len(c.dht.table)
})
return total
}