Add dispute types and change InclusionInherent to ParasInherent (#2791)

* dispute types

* add Debug to dispute primitives in std and InherentData

* use ParachainsInherentData on node-side

* change inclusion_inherent to paras_inherent

* RuntimeDebug

* add type parameter to PersistedValidationData users

* fix test client

* spaces

* fix collation-generation test

* fix provisioner tests

* remove references to inclusion inherent
This commit is contained in:
Robert Habermeier
2021-04-01 18:23:27 +02:00
committed by GitHub
parent 7a2e1ef6c1
commit 0794f69306
18 changed files with 247 additions and 114 deletions
+8 -4
View File
@@ -296,12 +296,16 @@ async fn send_inherent_data(
candidates,
relay_parent,
from_job,
)
.await?;
).await?;
let inherent_data = ProvisionerInherentData {
bitfields,
backed_candidates: candidates,
disputes: Vec::new(), // until disputes are implemented.
};
let res = (bitfields, candidates);
for return_sender in return_senders {
return_sender.send(res.clone()).map_err(|_data| Error::InherentDataReturnChannel)?;
return_sender.send(inherent_data.clone()).map_err(|_data| Error::InherentDataReturnChannel)?;
}
Ok(())
+2 -2
View File
@@ -342,7 +342,7 @@ mod select_candidates {
let mock_cores = mock_availability_cores();
let n_cores = mock_cores.len();
let empty_hash = PersistedValidationData::<BlockNumber>::default().hash();
let empty_hash = PersistedValidationData::<Hash, BlockNumber>::default().hash();
let candidate_template = CandidateReceipt {
descriptor: CandidateDescriptor {
@@ -415,7 +415,7 @@ mod select_candidates {
let mock_cores = mock_availability_cores();
let n_cores = mock_cores.len();
let empty_hash = PersistedValidationData::<BlockNumber>::default().hash();
let empty_hash = PersistedValidationData::<Hash, BlockNumber>::default().hash();
// why those particular indices? see the comments on mock_availability_cores()
// the first candidate with code is included out of [1, 4, 7, 8, 10].