Allow deprecated type in Swarm (#486)
We have to use the type of the upstream dependency
This commit is contained in:
parent
54dd96dfff
commit
c84c3fb93b
|
@ -12,7 +12,7 @@ pub use libp2p;
|
||||||
use blake2::digest::{consts::U32, Digest};
|
use blake2::digest::{consts::U32, Digest};
|
||||||
use blake2::Blake2b;
|
use blake2::Blake2b;
|
||||||
use libp2p::gossipsub::{Message, MessageId, TopicHash};
|
use libp2p::gossipsub::{Message, MessageId, TopicHash};
|
||||||
|
#[allow(deprecated)]
|
||||||
pub use libp2p::{
|
pub use libp2p::{
|
||||||
core::upgrade,
|
core::upgrade,
|
||||||
dns,
|
dns,
|
||||||
|
@ -151,6 +151,7 @@ impl Swarm {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl futures::Stream for Swarm {
|
impl futures::Stream for Swarm {
|
||||||
|
#[allow(deprecated)]
|
||||||
type Item = SwarmEvent<BehaviourEvent, THandlerErr<Behaviour>>;
|
type Item = SwarmEvent<BehaviourEvent, THandlerErr<Behaviour>>;
|
||||||
|
|
||||||
fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
|
fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
use std::{collections::HashMap, ops::Range, time::Duration};
|
use std::{collections::HashMap, ops::Range, time::Duration};
|
||||||
|
|
||||||
use mixnet_client::MixnetClient;
|
use mixnet_client::MixnetClient;
|
||||||
|
#[allow(deprecated)]
|
||||||
use nomos_libp2p::{
|
use nomos_libp2p::{
|
||||||
gossipsub::{self, Message},
|
gossipsub::{self, Message},
|
||||||
libp2p::swarm::ConnectionId,
|
libp2p::swarm::ConnectionId,
|
||||||
|
@ -88,6 +89,7 @@ impl SwarmHandler {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(deprecated)]
|
||||||
fn handle_event(&mut self, event: SwarmEvent<BehaviourEvent, THandlerErr<Behaviour>>) {
|
fn handle_event(&mut self, event: SwarmEvent<BehaviourEvent, THandlerErr<Behaviour>>) {
|
||||||
match event {
|
match event {
|
||||||
SwarmEvent::Behaviour(BehaviourEvent::Gossipsub(gossipsub::Event::Message {
|
SwarmEvent::Behaviour(BehaviourEvent::Gossipsub(gossipsub::Event::Message {
|
||||||
|
|
Loading…
Reference in New Issue