cfx_rpc_cfx_types/pos/
status.rs1use super::Decision;
6use cfx_types::{H256, U64};
7use serde_derive::Serialize;
8
9#[derive(Debug, Serialize)]
10#[serde(rename_all = "camelCase")]
11pub struct Status {
12 pub latest_committed: U64,
14 pub epoch: U64,
16 pub pivot_decision: Decision,
18 pub latest_voted: Option<U64>,
20 pub latest_tx_number: U64,
22}
23
24impl Default for Status {
25 fn default() -> Status {
26 Status {
27 epoch: U64::default(),
28 latest_committed: U64::default(),
29 pivot_decision: Decision {
30 height: U64::default(),
31 block_hash: H256::default(),
32 },
33 latest_voted: None,
34 latest_tx_number: U64::default(),
35 }
36 }
37}