1#[allow(clippy::derive_partial_eq_without_eq)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct TxPoolSignal {
5    #[prost(enumeration = "SignalType", tag = "1")]
7    pub signal_type: i32,
8    #[prost(string, tag = "2")]
10    pub chain_id: ::prost::alloc::string::String,
11}
12#[allow(clippy::derive_partial_eq_without_eq)]
14#[derive(Clone, PartialEq, ::prost::Message)]
15pub struct TxPoolStatus {
16    #[prost(int32, tag = "1")]
18    pub config_tx_pool_size: i32,
19    #[prost(int32, tag = "2")]
21    pub common_tx_pool_size: i32,
22    #[prost(int32, tag = "3")]
24    pub config_tx_num_in_queue: i32,
25    #[prost(int32, tag = "4")]
27    pub config_tx_num_in_pending: i32,
28    #[prost(int32, tag = "5")]
30    pub common_tx_num_in_queue: i32,
31    #[prost(int32, tag = "6")]
33    pub common_tx_num_in_pending: i32,
34}
35#[allow(clippy::derive_partial_eq_without_eq)]
37#[derive(Clone, PartialEq, ::prost::Message)]
38pub struct TxPoolMsg {
39    #[prost(enumeration = "TxPoolMsgType", tag = "1")]
41    pub r#type: i32,
42    #[prost(bytes = "vec", tag = "2")]
44    pub payload: ::prost::alloc::vec::Vec<u8>,
45}
46#[allow(clippy::derive_partial_eq_without_eq)]
48#[derive(Clone, PartialEq, ::prost::Message)]
49pub struct TxBatch {
50    #[prost(string, tag = "1")]
52    pub batch_id: ::prost::alloc::string::String,
53    #[prost(int32, tag = "3")]
55    pub size: i32,
56    #[prost(message, repeated, tag = "4")]
58    pub txs: ::prost::alloc::vec::Vec<super::common::Transaction>,
59    #[prost(map = "string, int32", tag = "5")]
61    pub tx_ids_map: ::std::collections::HashMap<::prost::alloc::string::String, i32>,
62    #[prost(message, optional, tag = "6")]
64    pub endorsement: ::core::option::Option<super::common::EndorsementEntry>,
65}
66#[allow(clippy::derive_partial_eq_without_eq)]
68#[derive(Clone, PartialEq, ::prost::Message)]
69pub struct TxRecoverRequest {
70    #[prost(string, tag = "1")]
72    pub node_id: ::prost::alloc::string::String,
73    #[prost(uint64, tag = "2")]
75    pub height: u64,
76    #[prost(string, repeated, tag = "3")]
78    pub tx_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
79}
80#[allow(clippy::derive_partial_eq_without_eq)]
82#[derive(Clone, PartialEq, ::prost::Message)]
83pub struct TxRecoverResponse {
84    #[prost(string, tag = "1")]
86    pub node_id: ::prost::alloc::string::String,
87    #[prost(uint64, tag = "2")]
89    pub height: u64,
90    #[prost(message, repeated, tag = "3")]
92    pub txs: ::prost::alloc::vec::Vec<super::common::Transaction>,
93}
94#[allow(clippy::derive_partial_eq_without_eq)]
96#[derive(Clone, PartialEq, ::prost::Message)]
97pub struct TxBatchRecoverRequest {
98    #[prost(string, tag = "1")]
100    pub node_id: ::prost::alloc::string::String,
101    #[prost(uint64, tag = "2")]
103    pub height: u64,
104    #[prost(string, repeated, tag = "3")]
106    pub batch_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
107}
108#[allow(clippy::derive_partial_eq_without_eq)]
110#[derive(Clone, PartialEq, ::prost::Message)]
111pub struct TxBatchRecoverResponse {
112    #[prost(string, tag = "1")]
114    pub node_id: ::prost::alloc::string::String,
115    #[prost(uint64, tag = "2")]
117    pub height: u64,
118    #[prost(message, repeated, tag = "3")]
120    pub tx_batches: ::prost::alloc::vec::Vec<TxBatch>,
121}
122#[allow(clippy::derive_partial_eq_without_eq)]
124#[derive(Clone, PartialEq, ::prost::Message)]
125pub struct GetPoolStatusRequest {
126    #[prost(string, tag = "1")]
128    pub chain_id: ::prost::alloc::string::String,
129}
130#[allow(clippy::derive_partial_eq_without_eq)]
132#[derive(Clone, PartialEq, ::prost::Message)]
133pub struct GetTxIdsByTypeAndStageRequest {
134    #[prost(string, tag = "1")]
136    pub chain_id: ::prost::alloc::string::String,
137    #[prost(enumeration = "TxType", tag = "2")]
139    pub tx_type: i32,
140    #[prost(enumeration = "TxStage", tag = "3")]
142    pub tx_stage: i32,
143}
144#[allow(clippy::derive_partial_eq_without_eq)]
146#[derive(Clone, PartialEq, ::prost::Message)]
147pub struct GetTxIdsByTypeAndStageResponse {
148    #[prost(string, repeated, tag = "1")]
150    pub tx_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
151}
152#[allow(clippy::derive_partial_eq_without_eq)]
154#[derive(Clone, PartialEq, ::prost::Message)]
155pub struct GetTxsInPoolByTxIdsRequest {
156    #[prost(string, tag = "1")]
158    pub chain_id: ::prost::alloc::string::String,
159    #[prost(string, repeated, tag = "2")]
161    pub tx_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
162}
163#[allow(clippy::derive_partial_eq_without_eq)]
165#[derive(Clone, PartialEq, ::prost::Message)]
166pub struct GetTxsInPoolByTxIdsResponse {
167    #[prost(message, repeated, tag = "1")]
169    pub txs: ::prost::alloc::vec::Vec<super::common::Transaction>,
170    #[prost(string, repeated, tag = "2")]
172    pub tx_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
173}
174#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
176#[repr(i32)]
177pub enum SignalType {
178    NoEvent = 0,
180    TransactionIncome = 1,
182    BlockPropose = 2,
184}
185impl SignalType {
186    pub fn as_str_name(&self) -> &'static str {
191        match self {
192            SignalType::NoEvent => "NO_EVENT",
193            SignalType::TransactionIncome => "TRANSACTION_INCOME",
194            SignalType::BlockPropose => "BLOCK_PROPOSE",
195        }
196    }
197    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
199        match value {
200            "NO_EVENT" => Some(Self::NoEvent),
201            "TRANSACTION_INCOME" => Some(Self::TransactionIncome),
202            "BLOCK_PROPOSE" => Some(Self::BlockPropose),
203            _ => None,
204        }
205    }
206}
207#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
209#[repr(i32)]
210pub enum TxType {
211    UnknownType = 0,
213    ConfigTx = 1,
215    CommonTx = 2,
217    AllType = 3,
219}
220impl TxType {
221    pub fn as_str_name(&self) -> &'static str {
226        match self {
227            TxType::UnknownType => "UNKNOWN_TYPE",
228            TxType::ConfigTx => "CONFIG_TX",
229            TxType::CommonTx => "COMMON_TX",
230            TxType::AllType => "ALL_TYPE",
231        }
232    }
233    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
235        match value {
236            "UNKNOWN_TYPE" => Some(Self::UnknownType),
237            "CONFIG_TX" => Some(Self::ConfigTx),
238            "COMMON_TX" => Some(Self::CommonTx),
239            "ALL_TYPE" => Some(Self::AllType),
240            _ => None,
241        }
242    }
243}
244#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
246#[repr(i32)]
247pub enum TxStage {
248    UnknownStage = 0,
250    InQueue = 1,
252    InPending = 2,
254    AllStage = 3,
256}
257impl TxStage {
258    pub fn as_str_name(&self) -> &'static str {
263        match self {
264            TxStage::UnknownStage => "UNKNOWN_STAGE",
265            TxStage::InQueue => "IN_QUEUE",
266            TxStage::InPending => "IN_PENDING",
267            TxStage::AllStage => "ALL_STAGE",
268        }
269    }
270    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
272        match value {
273            "UNKNOWN_STAGE" => Some(Self::UnknownStage),
274            "IN_QUEUE" => Some(Self::InQueue),
275            "IN_PENDING" => Some(Self::InPending),
276            "ALL_STAGE" => Some(Self::AllStage),
277            _ => None,
278        }
279    }
280}
281#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
283#[repr(i32)]
284pub enum TxPoolMsgType {
285    SingleTx = 0,
287    BatchTx = 1,
289    RecoverReq = 2,
291    RecoverResp = 3,
293}
294impl TxPoolMsgType {
295    pub fn as_str_name(&self) -> &'static str {
300        match self {
301            TxPoolMsgType::SingleTx => "SINGLE_TX",
302            TxPoolMsgType::BatchTx => "BATCH_TX",
303            TxPoolMsgType::RecoverReq => "RECOVER_REQ",
304            TxPoolMsgType::RecoverResp => "RECOVER_RESP",
305        }
306    }
307    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
309        match value {
310            "SINGLE_TX" => Some(Self::SingleTx),
311            "BATCH_TX" => Some(Self::BatchTx),
312            "RECOVER_REQ" => Some(Self::RecoverReq),
313            "RECOVER_RESP" => Some(Self::RecoverResp),
314            _ => None,
315        }
316    }
317}