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

Don't discard unwanted blocks we actually want #172

Closed
Stebalien opened this issue Aug 9, 2019 · 1 comment · Fixed by #174
Closed

Don't discard unwanted blocks we actually want #172

Stebalien opened this issue Aug 9, 2019 · 1 comment · Fixed by #174

Comments

@Stebalien
Copy link
Member

Currently, we discard blocks if they're not in the wantlist. However, we should probably accept them anyways if they're in the interest set.

@dirkmc
Copy link
Contributor

dirkmc commented Aug 13, 2019

Adding a little more context for my own understanding:

The session has an InterestedIn() function that returns true for any want that either

  1. Is pending being requested (until there is a free space in the live request list)
  2. Has been requested (in the live request list) but no response has yet been received

The WantManager has an IsWanted() function that returns true for any want that has been requested but no response has yet been received (same as 2 above).

If we happen to receive this block while it is still in the pending state (same as 1 above) we will not add it to the blockstore

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 a pull request may close this issue.

2 participants