pub fn has_connection_recently_responded(&self, now: chrono::DateTime<Utc>) -> bool {
        if let Some(last_response) = self.last_response {
            // Recent times and future times are considered live
            last_response.saturating_elapsed(now)
                <= constants::MIN_PEER_RECONNECTION_DELAY
                    .try_into()
                    .expect("unexpectedly large constant")
        } else {
            // If there has never been any response, it can't possibly be live
            false
        }
    }
/// Have we had any recently messages from this peer?
///
/// Returns `true` if the peer is likely connected and responsive in the peer
/// set.
///
/// [`constants::MIN_PEER_RECONNECTION_DELAY`] represents the time interval in which
/// we should receive at least one message from a peer, or close the
/// connection. Therefore, if the last-seen timestamp is older than
/// [`constants::MIN_PEER_RECONNECTION_DELAY`] ago, we know we should have
/// disconnected from it. Otherwise, we could potentially be connected to it.
Have we had any recently messages from this peer.
Returns `true` if the peer is likely connected and responsive in the peer
set.

[`constants::MIN_PEER_RECONNECTION_DELAY`] represents the time interval in which
we should receive at least one message from a peer, or close the
connection. Therefore, if the last-seen timestamp is older than
[`constants::MIN_PEER_RECONNECTION_DELAY`] ago, we know we should have
disconnected from it. Otherwise, we could potentially be connected to it.
Have we had any recently messages from this peer . Returns ` true ` if the peer is likely connected and responsive in the peer set . [ ` constants :: MIN_PEER_RECONNECTION_DELAY ` ] represents the time interval in which we should receive at least one message from a peer or close the connection . Therefore if the last - seen timestamp is older than [ ` constants :: MIN_PEER_RECONNECTION_DELAY ` ] ago we know we should have disconnected from it . Otherwise we could potentially be connected to it .
pub fn has_connection_recently_responded(&self, now: chrono::DateTime<Utc>) -> bool {
        if let Some(last_response) = self.last_response {
            // Recent times and future times are considered live
            last_response.saturating_elapsed(now)
                <= constants::MIN_PEER_RECONNECTION_DELAY
                    .try_into()
                    .expect("unexpectedly large constant")
        } else {
            // If there has never been any response, it can't possibly be live
            false
        }
    }
pub fn has_connection_recently_responded ( & self , now : chrono :: DateTime < Utc > ) -> bool { if let Some ( last_response ) = self . last_response { // Recent times and future times are considered live last_response . saturating_elapsed ( now ) <= constants :: MIN_PEER_RECONNECTION_DELAY . try_into ( ) . expect ( " " ) } else { // If there has never been any response, it can't possibly be live false } }
Have we had any recently messages from this peer?
Have we had any recently messages from this peer?
&self
now
chrono::DateTime<Utc>