mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-04-26 05:18:01 +00:00
Fix network ID and validator icons (#189)
* fix: Validator icons * fix: Propagation time for blocks < highest * fix: Reintroduce network_id to Rust backend
This commit is contained in:
@@ -11,6 +11,8 @@ pub struct NodeDetails {
|
||||
pub name: Box<str>,
|
||||
pub implementation: Box<str>,
|
||||
pub version: Box<str>,
|
||||
pub validator: Option<Box<str>>,
|
||||
pub network_id: Option<Box<str>>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug, Clone, Copy, PartialEq, Eq)]
|
||||
@@ -31,7 +33,7 @@ pub struct BlockDetails {
|
||||
pub block: Block,
|
||||
pub block_time: u64,
|
||||
pub block_timestamp: u64,
|
||||
pub propagation_time: u64,
|
||||
pub propagation_time: Option<u64>,
|
||||
}
|
||||
|
||||
pub type NodeHardware<'a> = (&'a [f32], &'a [f32], &'a [f64], &'a [f64], &'a [f64]);
|
||||
@@ -52,8 +54,8 @@ impl Serialize for NodeDetails {
|
||||
tup.serialize_element(&self.name)?;
|
||||
tup.serialize_element(&self.implementation)?;
|
||||
tup.serialize_element(&self.version)?;
|
||||
tup.serialize_element::<Option<String>>(&None)?; // TODO Maybe<Address>
|
||||
tup.serialize_element::<Option<usize>>(&None)?; // TODO Maybe<NetworkId>
|
||||
tup.serialize_element(&self.validator)?; // TODO Maybe<Address>
|
||||
tup.serialize_element(&self.network_id)?; // TODO Maybe<NetworkId>
|
||||
tup.serialize_element("")?; // TODO Address
|
||||
tup.end()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user