We need to move the code that listens for various events (PeerProtocolUpdated, PeerDisconnected/Connected etc etc) into a single event loop inside the Routing Table.
There's no reason to keep it in the DHT since we eventually want the RT to be a self sustaining data structure. This will also help prevent race conditions that arise in managing the RT/replacement-cache & make the code easy to reason about.
We need to move the code that listens for various events (PeerProtocolUpdated, PeerDisconnected/Connected etc etc) into a single event loop inside the Routing Table.
There's no reason to keep it in the DHT since we eventually want the RT to be a self sustaining data structure. This will also help prevent race conditions that arise in managing the RT/replacement-cache & make the code easy to reason about.
Once https://github.com/libp2p/go-libp2p/issues/801 goes in, we only need to depend on the event bus for all the relevant events & so will not have to depend on the host.