availability-distribution: look for leaf ancestors within the same session (#4596)

* availability-distribution: look for leaf ancestors

* Re-use subsystem-util

* Rework ancestry tasks scheduling

* Requester tests

* Improve readability for ancestors lookup
This commit is contained in:
Chris Sosnin
2022-01-26 07:52:07 +03:00
committed by GitHub
parent 922eb606c3
commit 0e2eb6d26c
5 changed files with 465 additions and 19 deletions
@@ -64,7 +64,7 @@ pub struct FetchTask {
/// In other words, for which relay chain parents this candidate is considered live.
/// This is updated on every `ActiveLeavesUpdate` and enables us to know when we can safely
/// stop keeping track of that candidate/chunk.
live_in: HashSet<Hash>,
pub(crate) live_in: HashSet<Hash>,
/// We keep the task around in until `live_in` becomes empty, to make
/// sure we won't re-fetch an already fetched candidate.