Skip to content

Commit

Permalink
Increase the outbound connection interval to 100ms
Browse files Browse the repository at this point in the history
  • Loading branch information
teor2345 committed Apr 18, 2023
1 parent 0187b92 commit b263379
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zebra-network/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ pub const HEARTBEAT_INTERVAL: Duration = Duration::from_secs(59);
/// connections are only initiated after this minimum time has elapsed.
///
/// It also enforces a minimum per-peer reconnection interval, and filters failed outbound peers.
pub const MIN_OUTBOUND_PEER_CONNECTION_INTERVAL: Duration = Duration::from_millis(50);
pub const MIN_OUTBOUND_PEER_CONNECTION_INTERVAL: Duration = Duration::from_millis(100);

/// The minimum time between _successful_ inbound peer connections, implemented by
/// `peer_set::initialize::accept_inbound_connections`.
Expand Down Expand Up @@ -398,8 +398,8 @@ mod tests {
/ (u32::try_from(MAX_ADDRS_IN_ADDRESS_BOOK).expect("fits in u32")
* MIN_OUTBOUND_PEER_CONNECTION_INTERVAL)
.as_secs() as f32
>= 0.5,
"most peers should get a connection attempt in each connection interval",
>= 0.2,
"some peers should get a connection attempt in each connection interval",
);

assert!(
Expand Down

0 comments on commit b263379

Please sign in to comment.