Commit e42045ad authored by Brian Tiger Chow's avatar Brian Tiger Chow Committed by Juan Batiz-Benet

style(bitswap) rename

parent a247e24c
...@@ -202,7 +202,7 @@ func (bs *bitswap) sendWantlistToProviders(ctx context.Context, wantlist *wantli ...@@ -202,7 +202,7 @@ func (bs *bitswap) sendWantlistToProviders(ctx context.Context, wantlist *wantli
message.AddEntry(e.Key, e.Priority) message.AddEntry(e.Key, e.Priority)
} }
ps := pset.New() set := pset.New()
// Get providers for all entries in wantlist (could take a while) // Get providers for all entries in wantlist (could take a while)
wg := sync.WaitGroup{} wg := sync.WaitGroup{}
...@@ -214,7 +214,7 @@ func (bs *bitswap) sendWantlistToProviders(ctx context.Context, wantlist *wantli ...@@ -214,7 +214,7 @@ func (bs *bitswap) sendWantlistToProviders(ctx context.Context, wantlist *wantli
providers := bs.routing.FindProvidersAsync(child, k, maxProvidersPerRequest) providers := bs.routing.FindProvidersAsync(child, k, maxProvidersPerRequest)
for prov := range providers { for prov := range providers {
if ps.TryAdd(prov.ID) { //Do once per peer if set.TryAdd(prov.ID) { //Do once per peer
bs.send(ctx, prov.ID, message) bs.send(ctx, prov.ID, message)
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment