mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-06 10:11:44 +00:00
remove nat module and use libp2p upnp (#4840)
* remove nat module and use libp2p upnp * update Cargo.lock * remove no longer used dependencies * restore nat module refactored * log successful mapping * only activate upnp if config enabled reduce logs to debug! * Merge branch 'unstable' of https://github.com/sigp/lighthouse into libp2p-nat * Merge branch 'unstable' of https://github.com/sigp/lighthouse into libp2p-nat * Merge branch 'unstable' of https://github.com/sigp/lighthouse into libp2p-nat * address review * Merge branch 'unstable' of https://github.com/sigp/lighthouse into libp2p-nat * Merge branch 'unstable' of https://github.com/sigp/lighthouse into libp2p-nat * Merge branch 'unstable' of https://github.com/sigp/lighthouse into libp2p-nat * address review
This commit is contained in:
@@ -8,7 +8,6 @@ use crate::{GossipTopic, NetworkConfig};
|
||||
use futures::future::Either;
|
||||
use libp2p::core::{multiaddr::Multiaddr, muxing::StreamMuxerBox, transport::Boxed};
|
||||
use libp2p::identity::{secp256k1, Keypair};
|
||||
use libp2p::quic;
|
||||
use libp2p::{core, noise, yamux, PeerId, Transport};
|
||||
use prometheus_client::registry::Registry;
|
||||
use slog::{debug, warn};
|
||||
@@ -63,8 +62,8 @@ pub fn build_transport(
|
||||
let transport = if quic_support {
|
||||
// Enables Quic
|
||||
// The default quic configuration suits us for now.
|
||||
let quic_config = quic::Config::new(&local_private_key);
|
||||
let quic = quic::tokio::Transport::new(quic_config);
|
||||
let quic_config = libp2p::quic::Config::new(&local_private_key);
|
||||
let quic = libp2p::quic::tokio::Transport::new(quic_config);
|
||||
let transport = tcp
|
||||
.or_transport(quic)
|
||||
.map(|either_output, _| match either_output {
|
||||
|
||||
Reference in New Issue
Block a user