We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 81c0e6d + ef54578 commit 516b667Copy full SHA for 516b667
1 file changed
src/compat/protocol.rs
@@ -4,9 +4,8 @@ use futures::io::{AsyncRead, AsyncWrite, AsyncWriteExt};
4
use libp2p::core::{upgrade, InboundUpgrade, OutboundUpgrade, UpgradeInfo};
5
use std::{io, iter};
6
7
-// Undocumented, but according to JS we our messages have a max size of 512*1024
8
-// https://github.com/ipfs/js-ipfs-bitswap/blob/d8f80408aadab94c962f6b88f343eb9f39fa0fcc/src/decision-engine/index.js#L16
9
-const MAX_BUF_SIZE: usize = 524_288;
+// 2MB Block Size according to the specs at https://github.com/ipfs/specs/blob/main/BITSWAP.md
+const MAX_BUF_SIZE: usize = 2_097_152;
10
11
#[derive(Clone, Debug, Default)]
12
pub struct CompatProtocol;
0 commit comments