Refactor check_validation_outputs (#4727)

* Move PersistedValidationData check into

* Address feedback

* Remove incorrect comment

* Update runtime/parachains/src/inclusion/mod.rs

* fmt

* Add logging

Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
Co-authored-by: Andronik <write@reusable.software>
This commit is contained in:
Lldenaurois
2022-01-28 11:21:28 +01:00
committed by GitHub
parent 0302271053
commit 23ee153e74
2 changed files with 47 additions and 31 deletions
@@ -710,6 +710,7 @@ impl<T: Config> Pallet<T> {
let scheduled = <scheduler::Pallet<T>>::scheduled();
let relay_parent_number = now - One::one();
let parent_storage_root = parent_header.state_root().clone();
let check_ctx = CandidateCheckContext::<T>::new(now, relay_parent_number);
let backed_candidates = sanitize_backed_candidates::<T, _>(
@@ -725,7 +726,7 @@ impl<T: Config> Pallet<T> {
// That way we avoid possible duplicate checks while assuring all
// backed candidates fine to pass on.
check_ctx
.verify_backed_candidate(parent_hash, candidate_idx, backed_candidate)
.verify_backed_candidate(parent_hash, parent_storage_root, candidate_idx, backed_candidate)
.is_err()
},
&scheduled[..],