From e766bc532ec6add39f02659bb4a15971080d900b Mon Sep 17 00:00:00 2001 From: Stanimal Date: Sat, 18 Apr 2020 20:04:06 +0200 Subject: [PATCH] Network fork - Fork network to prevent old nodes from spamming - Don't send discovery back from S&F --- comms/dht/src/store_forward/saf_handler/task.rs | 4 ++-- comms/src/connection_manager/wire_mode.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/comms/dht/src/store_forward/saf_handler/task.rs b/comms/dht/src/store_forward/saf_handler/task.rs index d78c150a05..f6c54dc5dd 100644 --- a/comms/dht/src/store_forward/saf_handler/task.rs +++ b/comms/dht/src/store_forward/saf_handler/task.rs @@ -196,8 +196,8 @@ where S: Service let response_types = vec![ SafResponseType::ForMe, - SafResponseType::InRegion, - SafResponseType::Discovery, + /* SafResponseType::InRegion, + * SafResponseType::Discovery, */ ]; for resp_type in response_types { diff --git a/comms/src/connection_manager/wire_mode.rs b/comms/src/connection_manager/wire_mode.rs index 7dd0e9a820..b2771cd254 100644 --- a/comms/src/connection_manager/wire_mode.rs +++ b/comms/src/connection_manager/wire_mode.rs @@ -23,7 +23,7 @@ use std::convert::TryFrom; pub enum WireMode { - Comms = 0x01, + Comms = 0x02, Liveness = 0x45, // E } @@ -32,7 +32,7 @@ impl TryFrom for WireMode { fn try_from(value: u8) -> Result { match value { - 0x01 => Ok(WireMode::Comms), + 0x02 => Ok(WireMode::Comms), 0x45 => Ok(WireMode::Liveness), _ => Err(()), }