Peering tweaks
sharePeers
works a bit differently now. It still sends up to 10 random peers, but now it won't send duplicates.
There is also some basic peer culling now. It's pretty unforgiving: if a peer does not respond to a broadcast, it will immediately be removed. Down the road I'll implement something more sophisticated, like sorting the peer list by last message time (I think Bitcoin does this).
It'd be nice if nodes would automatically cull peers whenever they received a sharePeers
request. Then you wouldn't receive any dead peers. But culling is expensive, because you have to wait for peers to time out. So I considered this a DoS vector and left it out.