mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-30 18:13:54 +08:00
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
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user