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
2020-10-06 20:37:19 +02:00
committed by GitHub
parent d00bdfef08
commit 325c24580e
4 changed files with 12 additions and 5 deletions
@@ -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,
}
```