checkpoint
This commit is contained in:
@@ -22,7 +22,7 @@ pub use network_connection::*;
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
use connection_handle::*;
|
||||
use connection_limits::*;
|
||||
use dht::*;
|
||||
use crypto::*;
|
||||
use futures_util::stream::{FuturesOrdered, FuturesUnordered, StreamExt};
|
||||
use hashlink::LruCache;
|
||||
use intf::*;
|
||||
@@ -783,11 +783,7 @@ impl NetworkManager {
|
||||
|
||||
// Process a received signal
|
||||
#[instrument(level = "trace", skip(self), err)]
|
||||
pub async fn handle_signal(
|
||||
&self,
|
||||
_sender_id: DHTKey,
|
||||
signal_info: SignalInfo,
|
||||
) -> EyreResult<NetworkResult<()>> {
|
||||
pub async fn handle_signal(&self, signal_info: SignalInfo) -> EyreResult<NetworkResult<()>> {
|
||||
match signal_info {
|
||||
SignalInfo::ReverseConnect { receipt, peer_info } => {
|
||||
let routing_table = self.routing_table();
|
||||
@@ -923,7 +919,7 @@ impl NetworkManager {
|
||||
// and if so, get the max version we can use
|
||||
let version = if let Some((node_min, node_max)) = node_ref.min_max_version() {
|
||||
#[allow(clippy::absurd_extreme_comparisons)]
|
||||
if node_min > MAX_VERSION || node_max < MIN_VERSION {
|
||||
if node_min > MAX_CRYPTO_VERSION || node_max < MIN_CRYPTO_VERSION {
|
||||
bail!(
|
||||
"can't talk to this node {} because version is unsupported: ({},{})",
|
||||
via_node_id,
|
||||
@@ -931,9 +927,9 @@ impl NetworkManager {
|
||||
node_max
|
||||
);
|
||||
}
|
||||
cmp::min(node_max, MAX_VERSION)
|
||||
cmp::min(node_max, MAX_CRYPTO_VERSION)
|
||||
} else {
|
||||
MAX_VERSION
|
||||
MAX_CRYPTO_VERSION
|
||||
};
|
||||
|
||||
// Build the envelope to send
|
||||
|
@@ -1,6 +1,6 @@
|
||||
use super::*;
|
||||
|
||||
use crate::dht::*;
|
||||
use crate::crypto::*;
|
||||
use crate::xx::*;
|
||||
use futures_util::FutureExt;
|
||||
use stop_token::future::FutureExt as StopFutureExt;
|
||||
@@ -265,8 +265,8 @@ impl NetworkManager {
|
||||
bsmap
|
||||
.entry(node_id)
|
||||
.or_insert_with(|| BootstrapRecord {
|
||||
min_version: MIN_VERSION,
|
||||
max_version: MAX_VERSION,
|
||||
min_version: MIN_CRYPTO_VERSION,
|
||||
max_version: MAX_CRYPTO_VERSION,
|
||||
dial_info_details: Vec::new(),
|
||||
})
|
||||
.dial_info_details
|
||||
@@ -299,8 +299,8 @@ impl NetworkManager {
|
||||
network_class: NetworkClass::InboundCapable, // Bootstraps are always inbound capable
|
||||
outbound_protocols: ProtocolTypeSet::only(ProtocolType::UDP), // Bootstraps do not participate in relaying and will not make outbound requests, but will have UDP enabled
|
||||
address_types: AddressTypeSet::all(), // Bootstraps are always IPV4 and IPV6 capable
|
||||
min_version: v.min_version, // Minimum protocol version specified in txt record
|
||||
max_version: v.max_version, // Maximum protocol version specified in txt record
|
||||
min_version: v.min_version, // Minimum crypto version specified in txt record
|
||||
max_version: v.max_version, // Maximum crypto version specified in txt record
|
||||
dial_info_detail_list: v.dial_info_details, // Dial info is as specified in the bootstrap list
|
||||
relay_peer_info: None, // Bootstraps never require a relay themselves
|
||||
}),
|
||||
|
Reference in New Issue
Block a user