mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 05:11:09 +00:00
Merge branch 'master' into rh-candidate-agreement
This commit is contained in:
@@ -81,4 +81,28 @@ mod tests {
|
||||
]
|
||||
}"#);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_body_serialization() {
|
||||
assert_eq!(ser::to_string_pretty(&Body {
|
||||
candidates: vec![
|
||||
parachain::Candidate {
|
||||
parachain_index: 10.into(),
|
||||
collator_signature: Default::default(),
|
||||
unprocessed_ingress: Default::default(),
|
||||
block: ::parachain::BlockData(vec![1, 3, 5, 8]),
|
||||
}
|
||||
],
|
||||
}), r#"{
|
||||
"candidates": [
|
||||
{
|
||||
"parachainIndex": 10,
|
||||
"collatorSignature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||
"unprocessedIngress": [],
|
||||
"block": "0x01030508"
|
||||
}
|
||||
]
|
||||
}"#);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ pub struct Candidate {
|
||||
/// Unprocessed ingress queue.
|
||||
///
|
||||
/// Ordered by parachain ID and block number.
|
||||
pub unprocessed_ingress: Vec<(u64, Vec<Message>)>,
|
||||
pub unprocessed_ingress: ConsolidatedIngress,
|
||||
/// Block data
|
||||
pub block: BlockData,
|
||||
}
|
||||
@@ -72,6 +72,13 @@ pub struct CandidateReceipt {
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize)]
|
||||
pub struct Message(#[serde(with="bytes")] pub Vec<u8>);
|
||||
|
||||
/// Consolidated ingress queue data.
|
||||
///
|
||||
/// This is just an ordered vector of other parachains' egress queues,
|
||||
/// obtained according to the routing rules.
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize)]
|
||||
pub struct ConsolidatedIngress(pub Vec<(Id, Vec<Message>)>);
|
||||
|
||||
/// Parachain block data.
|
||||
///
|
||||
/// contains everything required to validate para-block, may contain block and witness data
|
||||
|
||||
Reference in New Issue
Block a user