@cryptotaxi247 / kubo / commits / 8193049dd

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

Brian Tiger Chow committed Oct 27, 2014 at 05:45 UTC 8193049ddae76a0b30f9ee3625e241e013703dbe
1 file changed -1
exchange/bitswap/bitswap.go
-1
@@ -80,7 +80,6 @@ func (bs *bitswap) Block(parent context.Context, k u.Key) (*blocks.Block, error)
80 for _, wanted := range bs.wantlist.Keys() {
81 message.AppendWanted(wanted)
82 }
83 - message.AppendWanted(k)
83 for peerToQuery := range peersToQuery {
84 log.Debugf("bitswap got peersToQuery: %s", peerToQuery)
85 go func(p peer.Peer) {