This is the first step to establish exact requirements of #639.
What this does at the moment is that it passes a observer module down the supervision tree to workers. The workers are inbound and outbound connections. These worker processes link themselves to the observer module, so that in case of disconnect, the observer can catch the exit and:
store the peer we were connected to, to one of the mapsets
check the reason for the disconnect or process crash (while it also has access to the process state)
There's no logic yet when a connection gets dropped (either from ur or from them) - because I'm still figuring out what the logic should be. Like ... based on what should we pick a new peer?
The other part was that I removed the link between the PeerSupervisor and Kademlia. Kademlia now notifies the observer module of rounds and the flow of attaching dynamic children to outbound connections tree.
This is the first step to establish exact requirements of #639. What this does at the moment is that it passes a observer module down the supervision tree to workers. The workers are inbound and outbound connections. These worker processes link themselves to the observer module, so that in case of disconnect, the observer can catch the exit and:
There's no logic yet when a connection gets dropped (either from ur or from them) - because I'm still figuring out what the logic should be. Like ... based on what should we pick a new peer?
The other part was that I removed the link between the PeerSupervisor and Kademlia. Kademlia now notifies the observer module of rounds and the flow of attaching dynamic children to outbound connections tree.