You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the new SwarmBuilder you can not use mplex and yamux together. The test cases wrongly have feature = "mplex" which is not defined in Cargo.toml, thus the test never gets enabled.
Expected behavior
The following code should compile:
let _ = SwarmBuilder::with_new_identity().with_tokio().with_tcp(Default::default(),
libp2p_tls::Config::new,(
libp2p_yamux::Config::default(),
libp2p_mplex::MplexConfig::default(),),).unwrap().with_behaviour(|_| libp2p_swarm::dummy::Behaviour).unwrap().build();
Actual behavior
I'm getting this error:
error[E0277]: the trait bound `(libp2p_yamux::Config,MplexConfig): phase::IntoMultiplexerUpgrade<TlsStream<multistream_select::negotiated::Negotiated<libp2p_tcp::tokio::TcpStream>>>` is not satisfied
--> libp2p/src/builder.rs:174:17
|
171 | .with_tcp(
| -------- required by a bound introduced by this call
...
174 | / (175 | | libp2p_yamux::Config::default(),176 | | libp2p_mplex::MplexConfig::default(),177 | | ),
| |_________________^ the trait `phase::IntoMultiplexerUpgrade<TlsStream<multistream_select::negotiated::Negotiated<libp2p_tcp::tokio::TcpStream>>>` is not implemented for `(libp2p_yamux::Config,MplexConfig)`
|
= help: the trait `phase::IntoMultiplexerUpgrade<C>` is implemented for `(U1,U2)`
note: required by a bound in `tcp::<impl builder::SwarmBuilder<Tokio, tcp::TcpPhase>>::with_tcp`
--> libp2p/src/builder/phase/tcp.rs:72:29
|
50 | pub fn with_tcp<SecUpgrade,SecStream,SecError,MuxUpgrade,MuxStream,MuxError>(
| -------- required by a bound in this associated function
...
72 | MuxUpgrade:IntoMultiplexerUpgrade<SecStream>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `tcp::<implSwarmBuilder<Tokio,TcpPhase>>::with_tcp`
...
99 | impl_tcp_builder!("tokio",super::provider::Tokio, tokio);
| --------------------------------------------------------- in this macro invocation
= note: this error originates in the macro `impl_tcp_builder` (in Nightly builds, run with -Z macro-backtrace for more info)For more information about this error, try `rustc --explain E0277`.
Relevant log output
No response
Possible Solution
I got confused a bit with generics in that place, so I chouldn't fix it.
Version
0.53.0
Would you like to work on fixing this bug ?
No
The text was updated successfully, but these errors were encountered:
Summary
With the new
SwarmBuilder
you can not use mplex and yamux together. The test cases wrongly havefeature = "mplex"
which is not defined inCargo.toml
, thus the test never gets enabled.Expected behavior
The following code should compile:
Actual behavior
I'm getting this error:
Relevant log output
No response
Possible Solution
I got confused a bit with generics in that place, so I chouldn't fix it.
Version
0.53.0
Would you like to work on fixing this bug ?
No
The text was updated successfully, but these errors were encountered: