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

Fix order of session broadcast wants#291

Merged
Stebalien merged 2 commits intomasterfrom
fix/session-broadcast-wants
Mar 12, 2020
Merged

Fix order of session broadcast wants#291
Stebalien merged 2 commits intomasterfrom
fix/session-broadcast-wants

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).

@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.

@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