Skip to content
Merged
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/protocol/libp2p/bitswap/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use crate::{
};

use cid::Version;
use multihash::Code;
pub use multihash::Code as MultihashCode;
Comment thread
dmitry-markin marked this conversation as resolved.
Outdated
use prost::Message;
use tokio::sync::mpsc::{Receiver, Sender};
use tokio_stream::{StreamExt, StreamMap};
Expand Down Expand Up @@ -167,10 +167,7 @@ impl Bitswap {
_ => return None,
Comment thread
bkontur marked this conversation as resolved.
};

(cid.version() == cid::Version::V1
&& cid.hash().code() == u64::from(Code::Blake2b256)
&& cid.hash().size() == 32)
.then_some((cid, want_type))
Some((cid, want_type))
})
.collect::<Vec<_>>();

Expand Down
Loading