Discovery should just take IP address and wPort and should be able to connect and fetch peer list independently of Peer object. This will remove the need to create Peer objects for the seed peers just to fetch peer list from them. Also, it will be independent of the peer pool in terms of choosing peers with Peer objects already and could be handled independently.
Actual behavior
Discovery function accepts basic peer info P2PPeerInfo (with only ip and port) and uses connectAndFetch function to connect and fetch a peer list instead of creating Peer object for it. This will also simplify to filter out the black, white and fixed list in the future.
Expected behavior
Discovery should just take
IP
address andwPort
and should be able to connect and fetch peer list independently ofPeer
object. This will remove the need to createPeer
objects for the seed peers just to fetch peer list from them. Also, it will be independent of the peer pool in terms of choosing peers with Peer objects already and could be handled independently.Actual behavior
Discovery function accepts basic peer info
P2PPeerInfo
(with onlyip
andport
) and usesconnectAndFetch
function to connect and fetch a peer list instead of creating Peer object for it. This will also simplify to filter out the black, white and fixed list in the future.