Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

optimize the lookup which peers are waiting for a given block #486

Merged
merged 4 commits into from
Jun 24, 2021

Conversation

marten-seemann
Copy link
Member

No description provided.

Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't add any race conditions that don't already exist...

(already exist being the fact that we can add wants for a peer after it disconnects, but oh well..., we have an entire list of things like this to fix)

internal/decision/engine.go Outdated Show resolved Hide resolved
internal/decision/engine.go Show resolved Hide resolved
internal/decision/engine.go Show resolved Hide resolved
When receiving a new block (Engine.ReceiveFrom), we shouldn't have to loop over
all peers in order to determine if they need this block. Instead, use a map to
save which peers are waiting for a give Cid.
@Stebalien
Copy link
Member

Stebalien commented Jun 24, 2021

Nothing new (test failures).

@Stebalien Stebalien merged commit bbbbc66 into master Jun 24, 2021
@Stebalien Stebalien deleted the optimize-receive-from branch June 24, 2021 18:25
@aschmahmann aschmahmann mentioned this pull request Aug 23, 2021
62 tasks
Jorropo pushed a commit to Jorropo/go-libipfs that referenced this pull request Jan 26, 2023
optimize the lookup which peers are waiting for a given block

This commit was moved from ipfs/go-bitswap@bbbbc66
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants