mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-05-31 15:11:05 +00:00
AFG messaging (#210)
* First draft of afg messaging * AfgReceivedPrevote, AfgReceivedPrecommit and AfgFinalized added to rust backend * Tidy up
This commit is contained in:
@@ -37,13 +37,13 @@ pub enum Details {
|
||||
#[serde(rename = "txpool.import")]
|
||||
TxPoolImport(IgnoredAny),
|
||||
#[serde(rename = "afg.finalized")]
|
||||
AfgFinalized(IgnoredAny),
|
||||
AfgFinalized(AfgFinalized),
|
||||
#[serde(rename = "afg.received_precommit")]
|
||||
AfgReceivedPrecommit(IgnoredAny),
|
||||
AfgReceivedPrecommit(AfgReceivedPrecommit),
|
||||
#[serde(rename = "afg.received_prevote")]
|
||||
AfgReceivedPrevote(IgnoredAny),
|
||||
AfgReceivedPrevote(AfgReceivedPrevote),
|
||||
#[serde(rename = "afg.received_commit")]
|
||||
AfgReceivedCommit(IgnoredAny),
|
||||
AfgReceivedCommit(AfgReceivedCommit),
|
||||
#[serde(rename = "afg.authority_set")]
|
||||
AfgAuthoritySet(AfgAuthoritySet),
|
||||
#[serde(rename = "afg.finalized_blocks_up_to")]
|
||||
@@ -86,6 +86,39 @@ pub struct Finalized {
|
||||
#[derive(Deserialize, Debug)]
|
||||
pub struct AfgAuthoritySet {
|
||||
pub authority_id: Box<str>,
|
||||
pub authorities: Box<str>,
|
||||
pub authority_set_id: Box<str>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug, Clone)]
|
||||
pub struct AfgFinalized {
|
||||
pub finalized_hash: BlockHash,
|
||||
pub finalized_number: Box<str>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug, Clone)]
|
||||
pub struct AfgReceived {
|
||||
pub target_hash: BlockHash,
|
||||
pub target_number: Box<str>,
|
||||
pub voter: Box<str>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug, Clone)]
|
||||
pub struct AfgReceivedPrecommit {
|
||||
#[serde(flatten)]
|
||||
pub received: AfgReceived,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug, Clone)]
|
||||
pub struct AfgReceivedPrevote {
|
||||
#[serde(flatten)]
|
||||
pub received: AfgReceived,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug, Clone)]
|
||||
pub struct AfgReceivedCommit {
|
||||
#[serde(flatten)]
|
||||
pub received: AfgReceived,
|
||||
}
|
||||
|
||||
impl Block {
|
||||
|
||||
Reference in New Issue
Block a user