Skip to content

Commit

Permalink
Remove setting receive window size for Yamux
Browse files Browse the repository at this point in the history
  • Loading branch information
nazar-pc committed May 23, 2024
1 parent d39047a commit e5a8236
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions crates/subspace-networking/src/constructor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ const DIALING_INTERVAL_IN_SECS: Duration = Duration::from_secs(1);
/// Defines a replication factor for Kademlia on get_record operation.
/// "Good citizen" supports the network health.
const YAMUX_MAX_STREAMS: usize = 256;
/// 1MB of piece + original value (256 KB)
const YAMUX_RECEIVING_WINDOW: usize = Piece::SIZE + 256 * 1024;

/// Max confidence for autonat protocol. Could affect Kademlia mode change.
pub(crate) const AUTONAT_MAX_CONFIDENCE: usize = 3;
Expand Down Expand Up @@ -304,9 +302,6 @@ where

let mut yamux_config = YamuxConfig::default();
yamux_config.set_max_num_streams(YAMUX_MAX_STREAMS);
// TODO: Replace when new API is available like deprecation message says
#[allow(deprecated)]
yamux_config.set_receive_window_size(YAMUX_RECEIVING_WINDOW as u32);

let gossipsub = ENABLE_GOSSIP_PROTOCOL.then(|| {
GossipsubConfigBuilder::default()
Expand Down

0 comments on commit e5a8236

Please sign in to comment.