Skip to main content

peer_wins

Function peer_wins 

Source
pub fn peer_wins(
    peer_at: i64,
    peer_host: &str,
    mine_at: i64,
    my_host: &str,
) -> bool
Expand description

The LAN tie-break (§4.4): does a peer that started the agent at peer_at on peer_host win over this host’s claim at mine_at? The earlier start wins; starts within the skew budget are simultaneous and the lower hostname wins. Deterministic and symmetric: exactly one side wins for any pair of distinct hosts.