feat(bitswap) find providers for all keys on wantlist
@jbenet @whyrusleeping
this addresses a failure case where
1) bitswap wants blocks A and B
2) partner 1 has A and partner 2 has B
3) We choose a key at random, drawing A.
4) Then, we request A, neglecting to find a provider for B.
Sending the full wantlist is meant to be used as a helpful additional
piece of data, but...
unless our hunch is support by statistical inference at runtime,
it's not safe to assume that a peer will have blocks for related keys.
Routing must be the source of truth.
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Showing
Please register or sign in to comment