update comments, mostly TODO/FIXME notes

This commit is contained in:
Arceliar 2018-01-26 17:30:51 -06:00
parent 0cb7b3872d
commit c18d863a3e
13 changed files with 62 additions and 46 deletions

View file

@ -11,6 +11,11 @@ package yggdrasil
// TODO? use a pre-computed lookup table (python version had this)
// A little annoying to do with constant changes from bandwidth estimates
// FIXME (!) throttle how often root updates are accepted
// If the root starts spaming with new timestamps, it should only affect their neighbors
// The rest of the network should see announcements at a somewhat reasonable rate
// Maybe no faster than 2x the usual update interval
import "time"
import "sync"
import "sync/atomic"
@ -250,7 +255,7 @@ func (t *switchTable) cleanPeers() {
}
func (t *switchTable) cleanDropped() {
// TODO only call this after root changes, not periodically
// TODO? only call this after root changes, not periodically
for root := range t.drop {
if !firstIsBetter(&root, &t.data.locator.root) {
delete(t.drop, root)