mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
commit
fc5a5830aa
9 changed files with 261 additions and 517 deletions
|
@ -229,12 +229,10 @@ func DEBUG_wire_encode_coords(coords []byte) []byte {
|
|||
// DHT, via core
|
||||
|
||||
func (c *Core) DEBUG_getDHTSize() int {
|
||||
total := 0
|
||||
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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue