update libp2p to 0.55 (#6889)

Updates libp2p to `0.55`.
Will address the deprecations in a subsequent PR
This commit is contained in:
João Oliveira
2025-01-31 12:21:06 +00:00
committed by GitHub
parent b6db213548
commit ddb845d503
9 changed files with 351 additions and 159 deletions

View File

@@ -994,7 +994,7 @@ impl<E: EthSpec> NetworkBehaviour for Discovery<E> {
&mut self,
_peer_id: PeerId,
_connection_id: ConnectionId,
_event: void::Void,
_event: std::convert::Infallible,
) {
}

View File

@@ -37,7 +37,10 @@ impl<E: EthSpec> NetworkBehaviour for PeerManager<E> {
// no events from the dummy handler
}
fn poll(&mut self, cx: &mut Context<'_>) -> Poll<ToSwarm<Self::ToSwarm, void::Void>> {
fn poll(
&mut self,
cx: &mut Context<'_>,
) -> Poll<ToSwarm<Self::ToSwarm, std::convert::Infallible>> {
// perform the heartbeat when necessary
while self.heartbeat.poll_tick(cx).is_ready() {
self.heartbeat();

View File

@@ -353,6 +353,7 @@ where
!matches!(self.state, HandlerState::Deactivated)
}
#[allow(deprecated)]
fn poll(
&mut self,
cx: &mut Context<'_>,
@@ -814,6 +815,7 @@ where
Poll::Pending
}
#[allow(deprecated)]
fn on_connection_event(
&mut self,
event: ConnectionEvent<

View File

@@ -1846,7 +1846,7 @@ impl<E: EthSpec> Network<E> {
None
}
#[allow(unreachable_patterns)]
BehaviourEvent::ConnectionLimits(le) => void::unreachable(le),
BehaviourEvent::ConnectionLimits(le) => libp2p::core::util::unreachable(le),
},
SwarmEvent::ConnectionEstablished { .. } => None,
SwarmEvent::ConnectionClosed { .. } => None,