1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
use serde::{Deserialize, Serialize};
use tendermint::{block, node, validator, AppHash, Hash, Time};
#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
pub struct Request;
impl crate::Request for Request {
type Response = Response;
fn method(&self) -> crate::Method {
crate::Method::Status
}
}
impl crate::SimpleRequest for Request {}
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct Response {
pub node_info: node::Info,
pub sync_info: SyncInfo,
pub validator_info: validator::Info,
}
impl crate::Response for Response {}
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct SyncInfo {
#[serde(with = "tendermint::serializers::hash")]
pub latest_block_hash: Hash,
#[serde(with = "tendermint::serializers::apphash")]
pub latest_app_hash: AppHash,
pub latest_block_height: block::Height,
pub latest_block_time: Time,
pub catching_up: bool,
}