Remove broken "Consensus" tab from UI and related code (#434)

* Remove consensus-tab related stuff, and unused messages, from the telemetry backend

* also remove AfgAuthoritySet feed message, and handle same from node

* Blat everything consensus related that I can find in the UI

* cargo fmt

* README: had -> has

Co-authored-by: David <dvdplm@gmail.com>

Co-authored-by: David <dvdplm@gmail.com>
This commit is contained in:
James Wilson
2021-11-25 12:34:36 +00:00
committed by GitHub
parent 73a4cf29b9
commit 17432d712f
26 changed files with 57 additions and 2021 deletions
-49
View File
@@ -59,15 +59,7 @@ pub enum Payload {
SystemInterval(SystemInterval),
BlockImport(Block),
NotifyFinalized(Finalized),
TxPoolImport,
AfgFinalized(AfgFinalized),
AfgReceivedPrecommit(AfgReceived),
AfgReceivedPrevote(AfgReceived),
AfgReceivedCommit(AfgReceived),
AfgAuthoritySet(AfgAuthoritySet),
AfgFinalizedBlocksUpTo,
AuraPreSealedBlock,
PreparedBlockForProposing,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
@@ -94,19 +86,6 @@ pub struct Finalized {
pub height: Box<str>,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct AfgFinalized {
pub finalized_hash: BlockHash,
pub finalized_number: Box<str>,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct AfgReceived {
pub target_hash: BlockHash,
pub target_number: Box<str>,
pub voter: Option<Box<str>>,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct AfgAuthoritySet {
pub authority_id: Box<str>,
@@ -210,34 +189,6 @@ mod tests {
});
}
#[test]
fn bincode_can_serialize_and_deserialize_node_message_tx_pool_import() {
bincode_can_serialize_and_deserialize(NodeMessage::V1 {
payload: Payload::TxPoolImport,
});
}
#[test]
fn bincode_can_serialize_and_deserialize_node_message_afg_finalized() {
bincode_can_serialize_and_deserialize(NodeMessage::V1 {
payload: Payload::AfgFinalized(AfgFinalized {
finalized_hash: BlockHash::zero(),
finalized_number: "foo".into(),
}),
});
}
#[test]
fn bincode_can_serialize_and_deserialize_node_message_afg_received() {
bincode_can_serialize_and_deserialize(NodeMessage::V1 {
payload: Payload::AfgReceivedPrecommit(AfgReceived {
target_hash: BlockHash::zero(),
target_number: "foo".into(),
voter: None,
}),
});
}
#[test]
fn bincode_can_serialize_and_deserialize_node_message_afg_authority_set() {
bincode_can_serialize_and_deserialize(NodeMessage::V1 {