Default or custom selection should be able to use more details of a peer to select a peer like version, broadhash, os, etc.
Also, it affects triedPeer and newPeer list as it only holds P2PPeerInfo right now. So it loses the information it discovered about other peers during discovery or getStatus calls
Actual behavior
Right now, selection only gets an argument that has ip, wsPort and height as peer info.
We have to change, P2PPeerInfo to include detailed peer info to make it more robust and easy to pass around P2P and PeerPool
Expected behavior
Default or custom selection should be able to use more details of a peer to select a peer like version, broadhash, os, etc.
Also, it affects
triedPeer
andnewPeer
list as it only holdsP2PPeerInfo
right now. So it loses the information it discovered about other peers during discovery orgetStatus
callsActual behavior
Right now, selection only gets an argument that has
ip
,wsPort
andheight
as peer info.We have to change,
P2PPeerInfo
to include detailed peer info to make it more robust and easy to pass aroundP2P
andPeerPool