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

Fix order of session broadcast wants #291

Merged
merged 2 commits into from
Mar 12, 2020
Merged

Conversation

dirkmc
Copy link
Contributor

@dirkmc dirkmc commented Mar 11, 2020

Fixes #290

  • Limits the size of the list of wants that are broadcast on a Session idle tick
  • Finds Providers of the first want for which a block has not been received (instead of a random want)

@dirkmc dirkmc requested a review from Stebalien March 11, 2020 21:55
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.

We probably don't want a cidQueue here. If we're going to do this, we probably have to explicitly track the CIDs we're broadcasting in a set (I think).

internal/session/sessionwants.go Outdated Show resolved Hide resolved
@dirkmc
Copy link
Contributor Author

dirkmc commented Mar 12, 2020

You're right I can just keep the map and use an ordering array 👍

I updated, please take a look.

@dirkmc dirkmc requested a review from Stebalien March 12, 2020 14:47
@dirkmc dirkmc force-pushed the fix/session-broadcast-wants branch from 3417e5e to 73261ec Compare March 12, 2020 14:48
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 works but I think we can make this even simpler.

internal/session/sessionwants.go Show resolved Hide resolved
@Stebalien Stebalien merged commit cd14e70 into master Mar 12, 2020
@Stebalien Stebalien deleted the fix/session-broadcast-wants branch March 12, 2020 23:17
Jorropo pushed a commit to Jorropo/go-libipfs that referenced this pull request Jan 26, 2023
…t-wants

Fix order of session broadcast wants

This commit was moved from ipfs/go-bitswap@cd14e70
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.

Idle tick behaviour
2 participants