cfx_rpc_cfx_types/pos/
block.rs

1// Copyright 2019 Conflux Foundation. All rights reserved.
2// Conflux is free software and distributed under GNU General Public License.
3// See http://www.gnu.org/licenses/
4
5use super::Decision;
6use cfx_types::{H256, U64};
7use serde::Serialize;
8
9#[derive(Debug, Serialize, Clone)]
10#[serde(rename_all = "camelCase")]
11pub struct Block {
12    ///
13    pub hash: H256,
14    ///
15    pub height: U64,
16    ///
17    pub epoch: U64,
18    ///
19    pub round: U64,
20    ///
21    pub last_tx_number: U64,
22    ///
23    pub miner: Option<H256>,
24    ///
25    pub parent_hash: H256,
26    ///
27    pub timestamp: U64,
28    ///
29    pub pivot_decision: Option<Decision>,
30    ///
31    pub signatures: Vec<Signature>,
32}
33
34#[derive(Debug, Serialize, Clone)]
35#[serde(rename_all = "camelCase")]
36pub struct Signature {
37    ///
38    pub account: H256,
39    ///
40    // pub signature: String,
41    ///
42    pub votes: U64,
43}