Improve diagnostics for the ValidationOutputs checker / inclusion (#1926)

* Improve diagnostics for acceptance criteria failures during inclusion

* Initialize the runtime logger just before logging during inclusion

* Formatting suggestions

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Missed one suggestion

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
Sergei ShulepovandBastian Köcher authored and GitHub committed 2020-11-11 10:34:52 +00:00
1 parent fb6b94eaf0
commit dd4d8e24e0
8 files changed
+402 -206

No files matched your search

@@ -223,21 +223,7 @@ pub fn check_validation_outputs<T: initializer::Trait>(
para_id: ParaId,
outputs: primitives::v1::ValidationOutputs,
) -> bool {
match <inclusion::Module<T>>::check_validation_outputs(para_id, outputs) {
Ok(()) => true,
Err(e) => {
frame_support::debug::RuntimeLogger::init();
let err: &'static str = e.into();
log::debug!(
target: "candidate_validation",
"Validation outputs checking for parachain `{}` failed: {}",
u32::from(para_id),
err,
);
false
}
}
<inclusion::Module<T>>::check_validation_outputs(para_id, outputs)
}
/// Implementation for the `session_index_for_child` function of the runtime API.