Moare fixes for parachains (#1911)

* Moare fixes for parachains

- Sending data to a job should always contain a relay parent. Done this
for the provisioner
- Fixed the `select_availability_bitfields` function. It was assuming we
have one core per validator, while we only have one core per parachain.
- Drive by async "rewrite" in proposer

* Make tests compile

* Update primitives/src/v1.rs

Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>

Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
This commit is contained in:
Bastian Köcher
2020-11-03 18:16:47 +01:00
committed by GitHub
parent 04eba097b6
commit 04da99de58
11 changed files with 176 additions and 132 deletions
+2 -2
View File
@@ -527,7 +527,7 @@ pub enum ProvisionerMessage {
/// where it can be assembled into the InclusionInherent.
RequestInherentData(Hash, oneshot::Sender<ProvisionerInherentData>),
/// This data should become part of a relay chain block
ProvisionableData(ProvisionableData),
ProvisionableData(Hash, ProvisionableData),
}
impl ProvisionerMessage {
@@ -536,7 +536,7 @@ impl ProvisionerMessage {
match self {
Self::RequestBlockAuthorshipData(hash, _) => Some(*hash),
Self::RequestInherentData(hash, _) => Some(*hash),
Self::ProvisionableData(_) => None,
Self::ProvisionableData(hash, _) => Some(*hash),
}
}
}