Merge pull request #203 from Arceliar/chord

Chord
This commit is contained in:
Neil Alexander 2018-11-14 20:13:42 +00:00 committed by GitHub
commit fc5a5830aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 261 additions and 517 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 {