Right now we just connect to the seed nodes and leave it at that. A thread to manage node connections should be added.
Responsibilities might roughly include:
Detecting timeout on current connections (could also be handled in main node code, not sure)
Connecting to other nodes as needed to reach some level
Some possible optimizations that could be done on node connection management:
Try to maintain some small number of rotating connections that we will briefly connect to in order to map the network, find ping times, geolocate, etc. IE, we occasionally disconnect from some in this pool and try finding new connections to replace them, and while connected we don't really run getblocks and mempool.
Select a more diverse set of peers based on geolocation and ping time. This will aid in network propogation.
Actively track blockheight/hash of peers and try to maintain at least X number of peers that are on the same blockheight. In the bad Darkcoin forks there were issues with the clients maxconns getting filled with clients that were forked.
Right now we just connect to the seed nodes and leave it at that. A thread to manage node connections should be added.
Responsibilities might roughly include:
Some possible optimizations that could be done on node connection management: