provwasm_std/types/tendermint/
blocksync.rs

1use provwasm_proc_macro::CosmwasmExt;
2/// BlockRequest requests a block for a specific height
3#[allow(clippy::derive_partial_eq_without_eq)]
4#[derive(Clone, Copy, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
5#[proto_message(type_url = "/tendermint.blocksync.BlockRequest")]
6pub struct BlockRequest {
7    #[prost(int64, tag = "1")]
8    pub height: i64,
9}
10/// NoBlockResponse informs the node that the peer does not have block at the requested height
11#[allow(clippy::derive_partial_eq_without_eq)]
12#[derive(Clone, Copy, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
13#[proto_message(type_url = "/tendermint.blocksync.NoBlockResponse")]
14pub struct NoBlockResponse {
15    #[prost(int64, tag = "1")]
16    pub height: i64,
17}
18/// BlockResponse returns block to the requested
19#[allow(clippy::derive_partial_eq_without_eq)]
20#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
21#[proto_message(type_url = "/tendermint.blocksync.BlockResponse")]
22pub struct BlockResponse {
23    #[prost(message, optional, tag = "1")]
24    pub block: ::core::option::Option<super::types::Block>,
25    #[prost(message, optional, tag = "2")]
26    pub ext_commit: ::core::option::Option<super::types::ExtendedCommit>,
27}
28/// StatusRequest requests the status of a peer.
29#[allow(clippy::derive_partial_eq_without_eq)]
30#[derive(Clone, Copy, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
31#[proto_message(type_url = "/tendermint.blocksync.StatusRequest")]
32pub struct StatusRequest {}
33/// StatusResponse is a peer response to inform their status.
34#[allow(clippy::derive_partial_eq_without_eq)]
35#[derive(Clone, Copy, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
36#[proto_message(type_url = "/tendermint.blocksync.StatusResponse")]
37pub struct StatusResponse {
38    #[prost(int64, tag = "1")]
39    pub height: i64,
40    #[prost(int64, tag = "2")]
41    pub base: i64,
42}
43#[allow(clippy::derive_partial_eq_without_eq)]
44#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
45#[proto_message(type_url = "/tendermint.blocksync.Message")]
46pub struct Message {
47    #[prost(oneof = "message::Sum", tags = "1, 2, 3, 4, 5")]
48    pub sum: ::core::option::Option<message::Sum>,
49}
50/// Nested message and enum types in `Message`.
51pub mod message {
52    use provwasm_proc_macro::CosmwasmExt;
53    #[allow(clippy::derive_partial_eq_without_eq)]
54    #[derive(Clone, PartialEq, Eq, ::prost::Oneof, ::schemars::JsonSchema)]
55    pub enum Sum {
56        #[prost(message, tag = "1")]
57        BlockRequest(super::BlockRequest),
58        #[prost(message, tag = "2")]
59        NoBlockResponse(super::NoBlockResponse),
60        #[prost(message, tag = "3")]
61        BlockResponse(super::BlockResponse),
62        #[prost(message, tag = "4")]
63        StatusRequest(super::StatusRequest),
64        #[prost(message, tag = "5")]
65        StatusResponse(super::StatusResponse),
66    }
67}