doc: add fixmes to bitswap
This commit is contained in:
parent
cb6e57a8a6
commit
b6b14e93ba
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user