start migrating the router to an actor

This commit is contained in:
Arceliar 2019-08-23 18:47:15 -05:00
parent 562a7d1f19
commit 9d7e7288c6
8 changed files with 51 additions and 54 deletions

View file

@ -68,7 +68,6 @@ type dht struct {
core *Core
reconfigure chan chan error
nodeID crypto.NodeID
peers chan *dhtInfo // other goroutines put incoming dht updates here
reqs map[dhtReqKey]time.Time // Keeps track of recent outstanding requests
callbacks map[dhtReqKey][]dht_callbackInfo // Search and admin lookup callbacks
// These next two could be replaced by a single linked list or similar...
@ -87,7 +86,6 @@ func (t *dht) init(c *Core) {
}
}()
t.nodeID = *t.core.NodeID()
t.peers = make(chan *dhtInfo, 1024)
t.callbacks = make(map[dhtReqKey][]dht_callbackInfo)
t.reset()
}