Send statements to own backing group first (#2927)

* Factor out runtime module into utils.

* First fatal error design.

* Better error handling infra.

* Error handling cleanup.

* Send to peers of our group first.

* Finish backing group prioritization.

* Little cleanup.

* More cleanup.

* Forgot to checkin error.rs.

* Notes.

* Runtime -> RuntimeInfo

* qed in debug assert.

* PolkaErr -> Fault.
This commit is contained in:
Robert Klotzner authored and GitHub committed 2021-04-27 21:47:32 +02:00
1 parent 36bd876311
commit c86a774b9d
17 files changed
+1031 -280

No files matched your search

@@ -34,7 +34,7 @@ use polkadot_subsystem::messages::{
use polkadot_subsystem::{SubsystemContext, jaeger};
use crate::{
error::{Error, Result},
error::{Fatal, Result},
session_cache::{BadValidators, SessionInfo},
LOG_TARGET,
metrics::{Metrics, SUCCEEDED, FAILED},
@@ -191,7 +191,7 @@ impl FetchTask {
ctx.spawn("chunk-fetcher", running.run(kill).boxed())
.await
.map_err(|e| Error::SpawnTask(e))?;
.map_err(|e| Fatal::SpawnTask(e))?;
Ok(FetchTask {
live_in,