backing: refactor off of jobs system (#5377)

* backing: refactor off of jobs system

* rename FailedToSpawnBg

* refactor: backing uses fatality

* fix service compilation
This commit is contained in:
asynchronous rob
2022-04-27 17:19:45 -05:00
committed by GitHub
parent f23496d350
commit 9c1a3bd18b
6 changed files with 584 additions and 367 deletions
+6 -3
View File
@@ -28,7 +28,7 @@ use polkadot_primitives::v2::{
ScheduledCore,
};
use polkadot_subsystem::{
messages::{CollatorProtocolMessage, RuntimeApiMessage, RuntimeApiRequest},
messages::{CollatorProtocolMessage, RuntimeApiMessage, RuntimeApiRequest, ValidationFailed},
ActivatedLeaf, ActiveLeavesUpdate, FromOverseer, LeafStatus, OverseerSignal,
};
use sp_application_crypto::AppKey;
@@ -153,8 +153,11 @@ fn test_harness<T: Future<Output = VirtualOverseer>>(
let (context, virtual_overseer) = test_helpers::make_subsystem_context(pool.clone());
let subsystem =
CandidateBackingSubsystem::new(pool.clone(), keystore, Metrics(None)).run(context);
let subsystem = async move {
if let Err(e) = super::run(context, keystore, Metrics(None)).await {
panic!("{:?}", e);
}
};
let test_fut = test(virtual_overseer);