Skip to content

Commit

Permalink
[Network] Drop ping requests.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshLind committed Nov 4, 2024
1 parent 157ed9d commit 2b0de29
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions config/src/config/network_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ use std::{
/// [`aptos_network::protocols::wire::v1`](../../network/protocols/wire/handshake/v1/index.html).
pub const HANDSHAKE_VERSION: u8 = 0;
pub const NETWORK_CHANNEL_SIZE: usize = 1024;
pub const PING_INTERVAL_MS: u64 = 10_000;
pub const PING_INTERVAL_MS: u64 = 20_000;
pub const PING_TIMEOUT_MS: u64 = 20_000;
pub const PING_FAILURES_TOLERATED: u64 = 3;
pub const PING_FAILURES_TOLERATED: u64 = 10;
pub const CONNECTIVITY_CHECK_INTERVAL_MS: u64 = 5000;
pub const MAX_CONNECTION_DELAY_MS: u64 = 60_000; /* 1 minute */
pub const MAX_FULLNODE_OUTBOUND_CONNECTIONS: usize = 6;
Expand Down
7 changes: 4 additions & 3 deletions network/framework/src/protocols/health_checker/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,9 @@ impl<NetworkClient: NetworkClientInterface<HealthCheckerMsg> + Unpin> HealthChec
peer_id: PeerId,
ping: Ping,
protocol: ProtocolId,
res_tx: oneshot::Sender<Result<Bytes, RpcError>>,
_res_tx: oneshot::Sender<Result<Bytes, RpcError>>,
) {
let message = match protocol.to_bytes(&HealthCheckerMsg::Pong(Pong(ping.0))) {
let _message = match protocol.to_bytes(&HealthCheckerMsg::Pong(Pong(ping.0))) {
Ok(msg) => msg,
Err(e) => {
warn!(
Expand All @@ -300,10 +300,11 @@ impl<NetworkClient: NetworkClientInterface<HealthCheckerMsg> + Unpin> HealthChec
peer_id.short_str(),
ping.0,
);
/*
// Record Ingress HC here and reset failures.
self.network_interface.reset_peer_failures(peer_id);

let _ = res_tx.send(Ok(message.into()));
*/
}

async fn handle_ping_response(
Expand Down

0 comments on commit 2b0de29

Please sign in to comment.