doc: add fixmes to bitswap

This commit is contained in:
Joonas Koivunen 2020-07-21 14:28:51 +03:00
parent cb6e57a8a6
commit b6b14e93ba
2 changed files with 4 additions and 0 deletions

View File

@ -113,6 +113,9 @@ impl Bitswap {
/// Sends the wantlist to the peer.
fn send_want_list(&mut self, peer_id: PeerId) {
if !self.wanted_blocks.is_empty() {
// FIXME: this can produce a too long message
// FIXME: we should shard these across all of our peers by some logic; also peers may
// have been discovered with providing some specific wantlist item
let mut message = Message::default();
for (cid, priority) in &self.wanted_blocks {
message.want_block(cid, *priority);

View File

@ -108,6 +108,7 @@ impl Ledger {
if self.message.is_empty() {
return None;
}
// FIXME: this might produce too large message
for cid in self.message.cancel() {
self.sent_want_list.remove(cid);
}