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 authored and GitHub committed 2022-01-25 22:52:07 -06:00
1 parent 922eb606c3
commit 0e2eb6d26c
5 files changed
+465 -19

No files matched your search

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