Skip to content

Commit

Permalink
Change the window mode of yamux (sigp#2390)
Browse files Browse the repository at this point in the history
  • Loading branch information
AgeManning committed Jul 15, 2021
1 parent 6fb48b4 commit f4bc9db
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion beacon_node/eth2_libp2p/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,13 +375,17 @@ fn build_transport(
mplex_config.set_max_buffer_size(256);
mplex_config.set_max_buffer_behaviour(libp2p::mplex::MaxBufferBehaviour::Block);

// yamux config
let mut yamux_config = libp2p::yamux::YamuxConfig::default();
yamux_config.set_window_update_mode(libp2p::yamux::WindowUpdateMode::on_read());

// Authentication
Ok((
transport
.upgrade(core::upgrade::Version::V1)
.authenticate(generate_noise_config(&local_private_key))
.multiplex(core::upgrade::SelectUpgrade::new(
libp2p::yamux::YamuxConfig::default(),
yamux_config,
mplex_config,
))
.timeout(Duration::from_secs(10))
Expand Down

0 comments on commit f4bc9db

Please sign in to comment.