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:
Divma
2022-02-07 23:25:03 +00:00
parent 615695776e
commit 48b7c8685b
5 changed files with 102 additions and 202 deletions

View File

@@ -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);

View File

@@ -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));