Try using a chord-like DHT instead of a kad-like one, work in progress, but it compiles at least

This commit is contained in:
Arceliar 2018-10-20 14:48:07 -05:00
parent a9f72a6ee1
commit 03a88fe304
7 changed files with 182 additions and 510 deletions

View file

@ -358,7 +358,7 @@ func (ss *sessions) getSharedKey(myPriv *boxPrivKey,
return skey
}
// First do some cleanup
const maxKeys = dht_bucket_number * dht_bucket_size
const maxKeys = 1024
for key := range ss.permShared {
// Remove a random key until the store is small enough
if len(ss.permShared) < maxKeys {