we now prioritize anchorlist connections that match the requested
transports. this is because anchorlist connections may not be on the
whitelist, since we do not allow the refinery to refine existing
(anchorlist) connections. therefore, only sending from the whitelist
would risk not broadcasting the safest nodes.
Previously we would remove a host from the hostlist in two scenarios:
1. When a connected host disconnects
2. When we cannot establish a connection.
However, due to the refinery nodes frequently connect and disconnect
from eachother. This behavior (n.1 above) shouldn't result in entries
being removed from the hostlist.
Further, immediately removing a host when we cannot establish a connection
(n.2) is a more aggressive approach than the previous net code. Previously
we had a quaratine mechanism that allowed us to re-attempt N times before
the host was considered `rejected`.
Following this commit, the hostlist removal mechanism is as follows:
1. Remove a host if the version exchange in register_channel() fails
2. Re-introduce quarantine for outbound::try_connect. This removes a
host from the hostlist, and then allow multiple subsequent connection
attempts before marking the host as `rejected`.
Move the process that pings ourselves and creates a last_seen field
for each of our external addresses into a custom child process of
InboundSession, and remove from ProtocolSeed and ProtocolAddr.
This reverts commit 8a01a59b063b3d0dca1eae3963a83dcb52427487.
This commit was wrong because the channel gets shutdown after the receive loop returns Error::ChannelStopped in handle_stop()
Setting this to 0 disables inbound sessions by default, even if we have
configured a inbound address.
If we have a inbound address configured, it should be assumed we want to accept inbound sessions.