Introduce CollectCollationInfo runtime api (#443)

* Introduce `CollectCollationInfo` runtime api

Instead of using well known keys to communicate information about a
collation between the runtime and the collator, we now use a runtime api
for this.

* Fixes bug

* Apply suggestions from code review

Co-authored-by: Sergei Shulepov <sergei@parity.io>

* Doc update

Co-authored-by: Sergei Shulepov <sergei@parity.io>
This commit is contained in:
Bastian Köcher
2021-05-17 16:33:33 +02:00
committed by GitHub
parent 5245525bb2
commit 6674430f6e
14 changed files with 218 additions and 279 deletions
+6
View File
@@ -395,6 +395,12 @@ impl_runtime_apis! {
UpgradeDetection::get()
}
}
impl cumulus_primitives_core::CollectCollationInfo<Block> for Runtime {
fn collect_collation_info() -> cumulus_primitives_core::CollationInfo {
ParachainSystem::collect_collation_info()
}
}
}
cumulus_pallet_parachain_system::register_validate_block!(Runtime, Executive);