mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 10:31:03 +00:00
Introduce a Proof-of-Validation block type and use that in place of BlockData (#227)
* validators expect collators to give them parachain messages * mostly port network to use pov_block * network tests pass * verify ingress when fetching pov block * fix runtime compilation * all tests build * fix some grumbles * Update validation/src/collation.rs Co-Authored-By: rphmeier <rphmeier@gmail.com> * Update primitives/src/parachain.rs Co-Authored-By: rphmeier <rphmeier@gmail.com> * Update network/src/lib.rs Co-Authored-By: rphmeier <rphmeier@gmail.com>
This commit is contained in:
committed by
GitHub
parent
2bbfa0ae98
commit
1437c8e224
@@ -220,9 +220,18 @@ impl CollatorPool {
|
||||
mod tests {
|
||||
use super::*;
|
||||
use substrate_primitives::crypto::UncheckedInto;
|
||||
use polkadot_primitives::parachain::{CandidateReceipt, BlockData, HeadData};
|
||||
use polkadot_primitives::parachain::{
|
||||
CandidateReceipt, BlockData, PoVBlock, HeadData, ConsolidatedIngress,
|
||||
};
|
||||
use futures::Future;
|
||||
|
||||
fn make_pov(block_data: Vec<u8>) -> PoVBlock {
|
||||
PoVBlock {
|
||||
block_data: BlockData(block_data),
|
||||
ingress: ConsolidatedIngress(Vec::new()),
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn disconnect_primary_gives_new_primary() {
|
||||
let mut pool = CollatorPool::new();
|
||||
@@ -272,7 +281,7 @@ mod tests {
|
||||
fees: 0,
|
||||
block_data_hash: [3; 32].into(),
|
||||
},
|
||||
block_data: BlockData(vec![4, 5, 6]),
|
||||
pov: make_pov(vec![4, 5, 6]),
|
||||
});
|
||||
|
||||
rx1.wait().unwrap();
|
||||
@@ -299,7 +308,7 @@ mod tests {
|
||||
fees: 0,
|
||||
block_data_hash: [3; 32].into(),
|
||||
},
|
||||
block_data: BlockData(vec![4, 5, 6]),
|
||||
pov: make_pov(vec![4, 5, 6]),
|
||||
});
|
||||
|
||||
let (tx, rx) = oneshot::channel();
|
||||
|
||||
Reference in New Issue
Block a user