provwasm_std/types/tendermint/
blocksync.rs

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