Skip to content
This repository was archived by the owner on Oct 23, 2022. It is now read-only.

Commit a7d342b

Browse files
committed
fix: use just the Multihash in Behavior::want_block
Signed-off-by: ljedrz <ljedrz@gmail.com>
1 parent bbb6707 commit a7d342b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/p2p/behaviour.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ impl<Types: IpfsTypes> Behaviour<Types> {
471471
// FIXME: it would be best if get_providers is called only in case the already connected
472472
// peers don't have it
473473
pub fn want_block(&mut self, cid: Cid) {
474-
let key = cid.to_bytes();
474+
let key = cid.hash().as_bytes().to_owned();
475475
self.kademlia.get_providers(key.into());
476476
self.bitswap.want_block(cid, 1);
477477
}

0 commit comments

Comments
 (0)