In joystream-node wrapper, when processing peer_connected_alert, peer_disconnected_alert, PeerPluginAdded/Removed alerts, it has proved to be very difficult to maintain a consistent (accurate) state of what peers we are connected to.
This has turned out to be a symptom of misinterpreting the meaning of some of the libtorrent alerts, timing of emplacing the plugin alerts, in addition to not taking into consideration half open connections (outgoing libtorrent connections) and how we are trying to maintain the _peers map in the TorrentPlugin (extension-cpp)
There is a case also where a connected peer that should have a peerplugin installed on it doesn't get one.
In joystream-node wrapper, when processing peer_connected_alert, peer_disconnected_alert, PeerPluginAdded/Removed alerts, it has proved to be very difficult to maintain a consistent (accurate) state of what peers we are connected to.
This has turned out to be a symptom of misinterpreting the meaning of some of the libtorrent alerts, timing of emplacing the plugin alerts, in addition to not taking into consideration half open connections (outgoing libtorrent connections) and how we are trying to maintain the _peers map in the TorrentPlugin (extension-cpp)
There is a case also where a connected peer that should have a peerplugin installed on it doesn't get one.