Skip to content

Commit

Permalink
deps: update pea2pea to 0.37
Browse files Browse the repository at this point in the history
Signed-off-by: ljedrz <[email protected]>
  • Loading branch information
ljedrz committed May 4, 2022
1 parent 24f77d6 commit d242bb5
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .crawler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ optional = true
version = "0.12"

[dependencies.pea2pea]
version = "0.36"
version = "0.37"

[dependencies.postgres-native-tls]
version = "0.5"
Expand Down
5 changes: 0 additions & 5 deletions .crawler/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ pub const STALE_CONNECTION_CUTOFF_TIME_HRS: i64 = 4;
pub const DESIRED_PEER_SET_COUNT: u8 = 3;
/// The maximum number of connections to attempt to initiate when updating peers.
pub const NUM_CONCURRENT_CONNECTION_ATTEMPTS: u8 = 50;
/// The maximum time (in milliseconds) a handshake can take; doesn't have to match the one in the snarkOS node.
pub const MAX_HANDSHAKE_TIME_MS: u64 = 10_000;
/// The size of the per-connection read buffer.
// TODO: double-check maximum message length
pub const READ_BUFFER_SIZE: usize = 16 * 1024;
/// The number of peers shared with the crawled nodes when requested.
pub const SHARED_PEER_COUNT: usize = 15;
/// The number of connection failures after which a node is removed from the list of known nodes.
Expand Down
1 change: 0 additions & 1 deletion .crawler/src/crawler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ impl Crawler {
listener_ip: Some(opts.addr.ip()),
desired_listening_port: Some(opts.addr.port()),
max_connections: MAXIMUM_NUMBER_OF_PEERS as u16,
max_handshake_time_ms: MAX_HANDSHAKE_TIME_MS,
..Default::default()
};

Expand Down
2 changes: 1 addition & 1 deletion .integration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ optional = true
version = "0.1"

[dependencies.pea2pea]
version = "0.36"
version = "0.37"

[dependencies.peak_alloc]
version = "0.1"
Expand Down
2 changes: 1 addition & 1 deletion .synthetic_node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ version = "0.3"
version = "0.12"

[dependencies.pea2pea]
version = "0.36"
version = "0.37"

[dependencies.rand]
version = "0.8"
Expand Down
2 changes: 2 additions & 0 deletions .synthetic_node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ impl SynthNode {
/// Automated handshake handling for the test nodes.
#[async_trait::async_trait]
impl Handshake for SynthNode {
const TIMEOUT_MS: u64 = 10_000;

async fn perform_handshake(&self, mut connection: Connection) -> io::Result<Connection> {
let own_ip = self.node().listening_addr()?;
let peer_addr = connection.addr();
Expand Down

0 comments on commit d242bb5

Please sign in to comment.