mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-12 09:31:20 +00:00
feat(noise): deprecate all handshake patterns apart from XX
In the libp2p specs, the only handshake pattern that is specified is the XX handshake. Support for other handshake patterns can be added through external modules. While we are at it, we rename the remaining types to following the laid out naming convention. The tests for handshakes other than XX are removed. The handshakes still work as we don't touch them in this patch. Related #2217. Pull-Request: #3768.
This commit is contained in:
@ -52,7 +52,7 @@ async fn main() -> Result<()> {
|
||||
libp2p_tcp::async_io::Transport::new(libp2p_tcp::Config::default().port_reuse(true))
|
||||
.upgrade(upgrade::Version::V1Lazy)
|
||||
.authenticate(
|
||||
libp2p_noise::NoiseAuthenticated::xx(&local_key)
|
||||
libp2p_noise::Config::new(&local_key)
|
||||
.expect("Signing libp2p-noise static DH keypair failed."),
|
||||
)
|
||||
.multiplex(libp2p_yamux::YamuxConfig::default());
|
||||
|
@ -46,7 +46,7 @@ async fn main() {
|
||||
libp2p_tcp::async_io::Transport::new(libp2p_tcp::Config::default().port_reuse(true))
|
||||
.upgrade(upgrade::Version::V1Lazy)
|
||||
.authenticate(
|
||||
libp2p_noise::NoiseAuthenticated::xx(&local_key)
|
||||
libp2p_noise::Config::new(&local_key)
|
||||
.expect("Signing libp2p-noise static DH keypair failed."),
|
||||
)
|
||||
.multiplex(libp2p_yamux::YamuxConfig::default());
|
||||
|
Reference in New Issue
Block a user