Commit 8193049d authored by Brian Tiger Chow's avatar Brian Tiger Chow

fix(bitswap) duplicate key in wantlist

@whyrusleeping noticed this a couple days ago

potential long-term fix: prevent duplicate entries in the wantlist by
using a map/set and iterating over this data structure on export
parent e8ec8ce9
......@@ -80,7 +80,6 @@ func (bs *bitswap) Block(parent context.Context, k u.Key) (*blocks.Block, error)
for _, wanted := range bs.wantlist.Keys() {
message.AppendWanted(wanted)
}
message.AppendWanted(k)
for peerToQuery := range peersToQuery {
log.Debugf("bitswap got peersToQuery: %s", peerToQuery)
go func(p peer.Peer) {
......
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