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
@@ -24,7 +24,7 @@ use thiserror::Error;
use futures::channel::oneshot;
use polkadot_node_subsystem_util::runtime;
use polkadot_subsystem::SubsystemError;
use polkadot_subsystem::{ChainApiError, SubsystemError};
use crate::LOG_TARGET;
@@ -63,6 +63,12 @@ pub enum Fatal {
/// Errors coming from runtime::Runtime.
#[error("Error while accessing runtime information: {0}")]
Runtime(#[from] runtime::Fatal),
#[error("Oneshot for receiving response from Chain API got cancelled")]
ChainApiSenderDropped(#[source] oneshot::Canceled),
#[error("Retrieving response from Chain API unexpectedly failed with error: {0}")]
ChainApi(#[from] ChainApiError),
}
/// Non-fatal errors of this subsystem.