cometbft_proto/prost/
cometbft.blocksync.v1.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/// StatusRequest requests the status of a peer.
16#[allow(clippy::derive_partial_eq_without_eq)]
17#[derive(Clone, PartialEq, ::prost::Message)]
18pub struct StatusRequest {}
19/// StatusResponse is a peer response to inform their status.
20#[allow(clippy::derive_partial_eq_without_eq)]
21#[derive(Clone, PartialEq, ::prost::Message)]
22pub struct StatusResponse {
23    #[prost(int64, tag = "1")]
24    pub height: i64,
25    #[prost(int64, tag = "2")]
26    pub base: i64,
27}
28/// BlockResponse returns block to the requested
29#[allow(clippy::derive_partial_eq_without_eq)]
30#[derive(Clone, PartialEq, ::prost::Message)]
31pub struct BlockResponse {
32    #[prost(message, optional, tag = "1")]
33    pub block: ::core::option::Option<super::super::types::v1::Block>,
34    #[prost(message, optional, tag = "2")]
35    pub ext_commit: ::core::option::Option<super::super::types::v1::ExtendedCommit>,
36}
37/// Message is an abtract blocksync message.
38#[allow(clippy::derive_partial_eq_without_eq)]
39#[derive(Clone, PartialEq, ::prost::Message)]
40pub struct Message {
41    /// Sum of all possible messages.
42    #[prost(oneof = "message::Sum", tags = "1, 2, 3, 4, 5")]
43    pub sum: ::core::option::Option<message::Sum>,
44}
45/// Nested message and enum types in `Message`.
46pub mod message {
47    /// Sum of all possible messages.
48    #[allow(clippy::derive_partial_eq_without_eq)]
49    #[derive(Clone, PartialEq, ::prost::Oneof)]
50    pub enum Sum {
51        #[prost(message, tag = "1")]
52        BlockRequest(super::BlockRequest),
53        #[prost(message, tag = "2")]
54        NoBlockResponse(super::NoBlockResponse),
55        #[prost(message, tag = "3")]
56        BlockResponse(super::BlockResponse),
57        #[prost(message, tag = "4")]
58        StatusRequest(super::StatusRequest),
59        #[prost(message, tag = "5")]
60        StatusResponse(super::StatusResponse),
61    }
62}