Pass relay parent as argument when collating (#1789)

This pr changes the collation function to also pass the current relay
parent the parachain block should be build on.
This commit is contained in:
Bastian Köcher authored and GitHub committed 2020-10-06 18:37:19 +00:00
1 parent d00bdfef08
commit 325c24580e
4 files changed
+12 -5

No files matched your search

@@ -36,7 +36,10 @@ pub struct Collation {
struct CollationGenerationConfig {
key: CollatorPair,
collator: Box<dyn Fn(&ValidationData) -> Box<dyn Future<Output = Option<Collation>>>>
/// Collate will be called with the relay chain hash the parachain should build
/// a block on and the `ValidationData` that provides information about the state
/// of the parachain on the relay chain.
collator: Box<dyn Fn(Hash, &ValidationData) -> Box<dyn Future<Output = Option<Collation>>>>
para_id: ParaId,
}
```