cometbft_proto/prost/
cometbft.blocksync.v1beta1.rs

1/// BlockRequest requests a block for a specific height
2#[allow(clippy::derive_partial_eq_without_eq)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct BlockRequest {
5    #[prost(int64, tag = "1")]
6    pub height: i64,
7}
8/// NoBlockResponse informs the node that the peer does not have block at the requested height
9#[allow(clippy::derive_partial_eq_without_eq)]
10#[derive(Clone, PartialEq, ::prost::Message)]
11pub struct NoBlockResponse {
12    #[prost(int64, tag = "1")]
13    pub height: i64,
14}
15/// BlockResponse returns block to the requested
16#[allow(clippy::derive_partial_eq_without_eq)]
17#[derive(Clone, PartialEq, ::prost::Message)]
18pub struct BlockResponse {
19    #[prost(message, optional, tag = "1")]
20    pub block: ::core::option::Option<super::super::types::v1beta1::Block>,
21}
22/// StatusRequest requests the status of a peer.
23#[allow(clippy::derive_partial_eq_without_eq)]
24#[derive(Clone, PartialEq, ::prost::Message)]
25pub struct StatusRequest {}
26/// StatusResponse is a peer response to inform their status.
27#[allow(clippy::derive_partial_eq_without_eq)]
28#[derive(Clone, PartialEq, ::prost::Message)]
29pub struct StatusResponse {
30    #[prost(int64, tag = "1")]
31    pub height: i64,
32    #[prost(int64, tag = "2")]
33    pub base: i64,
34}
35/// Message is an abtract blocksync message.
36#[allow(clippy::derive_partial_eq_without_eq)]
37#[derive(Clone, PartialEq, ::prost::Message)]
38pub struct Message {
39    /// Sum of all possible messages.
40    #[prost(oneof = "message::Sum", tags = "1, 2, 3, 4, 5")]
41    pub sum: ::core::option::Option<message::Sum>,
42}
43/// Nested message and enum types in `Message`.
44pub mod message {
45    /// Sum of all possible messages.
46    #[allow(clippy::derive_partial_eq_without_eq)]
47    #[derive(Clone, PartialEq, ::prost::Oneof)]
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}