mirror of
https://github.com/sigp/lighthouse.git
synced 2026-07-03 21:04:28 +00:00
Bump discv5 (#9394)
Bump `discv5` to the latest release. This removes the duplicated `hashlink` dependency and also removes `ahash`. Co-Authored-By: Mac L <mjladson@pm.me>
This commit is contained in:
@@ -11,7 +11,7 @@ use lighthouse_network::{
|
||||
use network_utils::enr_ext::CombinedKeyExt;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use ssz::Encode;
|
||||
use std::net::{SocketAddrV4, SocketAddrV6};
|
||||
use std::net::{SocketAddr, SocketAddrV4, SocketAddrV6};
|
||||
use std::time::Duration;
|
||||
use std::{marker::PhantomData, path::PathBuf};
|
||||
use tracing::{info, warn};
|
||||
@@ -218,6 +218,20 @@ impl BootNodeConfigSerialization {
|
||||
Some(SocketAddrV4::new(ipv4, ipv4_port)),
|
||||
Some(SocketAddrV6::new(ipv6, ipv6_port, 0, 0)),
|
||||
),
|
||||
lighthouse_network::discv5::ListenConfig::FromSockets { ref ipv4, ref ipv6 } => (
|
||||
ipv4.as_ref()
|
||||
.and_then(|socket| socket.local_addr().ok())
|
||||
.and_then(|addr| match addr {
|
||||
SocketAddr::V4(addr) => Some(addr),
|
||||
SocketAddr::V6(_) => None,
|
||||
}),
|
||||
ipv6.as_ref()
|
||||
.and_then(|socket| socket.local_addr().ok())
|
||||
.and_then(|addr| match addr {
|
||||
SocketAddr::V6(addr) => Some(addr),
|
||||
SocketAddr::V4(_) => None,
|
||||
}),
|
||||
),
|
||||
};
|
||||
|
||||
BootNodeConfigSerialization {
|
||||
|
||||
@@ -128,7 +128,7 @@ pub async fn run<E: EthSpec>(
|
||||
}
|
||||
|
||||
// display server metrics
|
||||
let metrics = discv5.metrics();
|
||||
let metrics = Discv5::metrics();
|
||||
info!(
|
||||
connected_peers = discv5.connected_peers(),
|
||||
active_sessions = metrics.active_sessions,
|
||||
|
||||
Reference in New Issue
Block a user