mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 11:41:51 +00:00
upgrade libp2p (#2933)
## Issue Addressed Upgrades libp2p to v.0.42.0 pre release (https://github.com/libp2p/rust-libp2p/pull/2440)
This commit is contained in:
@@ -38,15 +38,12 @@ directory = { path = "../../common/directory" }
|
||||
regex = "1.3.9"
|
||||
strum = { version = "0.21.0", features = ["derive"] }
|
||||
superstruct = "0.4.0"
|
||||
open-metrics-client = "0.13.0"
|
||||
open-metrics-client = "0.14.0"
|
||||
|
||||
[dependencies.libp2p]
|
||||
# version = "0.41.0"
|
||||
version = "0.42.1"
|
||||
default-features = false
|
||||
git = "https://github.com/libp2p/rust-libp2p"
|
||||
# Latest libp2p master
|
||||
rev = "17861d9cac121f7e448585a7f052d5eab4618826"
|
||||
features = ["websocket", "identify", "mplex", "yamux", "noise", "gossipsub", "dns-tokio", "tcp-tokio", "plaintext"]
|
||||
features = ["websocket", "identify", "mplex", "yamux", "noise", "gossipsub", "dns-tokio", "tcp-tokio", "plaintext", "secp256k1"]
|
||||
|
||||
[dev-dependencies]
|
||||
slog-term = "2.6.0"
|
||||
|
||||
@@ -963,10 +963,11 @@ impl<TSpec: EthSpec> NetworkBehaviour for Discovery<TSpec> {
|
||||
match error {
|
||||
DialError::Banned
|
||||
| DialError::LocalPeerId
|
||||
| DialError::InvalidPeerId
|
||||
| DialError::InvalidPeerId(_)
|
||||
| DialError::ConnectionIo(_)
|
||||
| DialError::NoAddresses
|
||||
| DialError::Transport(_) => {
|
||||
| DialError::Transport(_)
|
||||
| DialError::WrongPeerId { .. } => {
|
||||
// set peer as disconnected in discovery DHT
|
||||
debug!(self.log, "Marking peer disconnected in DHT"; "peer_id" => %peer_id);
|
||||
self.disconnect_peer(&peer_id);
|
||||
|
||||
@@ -161,7 +161,7 @@ impl<TSpec: EthSpec> NetworkBehaviour for PeerManager<TSpec> {
|
||||
self.events
|
||||
.push(PeerManagerEvent::PeerConnectedIncoming(*peer_id));
|
||||
}
|
||||
ConnectedPoint::Dialer { address } => {
|
||||
ConnectedPoint::Dialer { address, .. } => {
|
||||
self.inject_connect_outgoing(peer_id, address.clone(), None);
|
||||
self.events
|
||||
.push(PeerManagerEvent::PeerConnectedOutgoing(*peer_id));
|
||||
|
||||
Reference in New Issue
Block a user