#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxPoolSignal {
#[prost(enumeration = "SignalType", tag = "1")]
pub signal_type: i32,
#[prost(string, tag = "2")]
pub chain_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxPoolStatus {
#[prost(int32, tag = "1")]
pub config_tx_pool_size: i32,
#[prost(int32, tag = "2")]
pub common_tx_pool_size: i32,
#[prost(int32, tag = "3")]
pub config_tx_num_in_queue: i32,
#[prost(int32, tag = "4")]
pub config_tx_num_in_pending: i32,
#[prost(int32, tag = "5")]
pub common_tx_num_in_queue: i32,
#[prost(int32, tag = "6")]
pub common_tx_num_in_pending: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxPoolMsg {
#[prost(enumeration = "TxPoolMsgType", tag = "1")]
pub r#type: i32,
#[prost(bytes = "vec", tag = "2")]
pub payload: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxBatch {
#[prost(string, tag = "1")]
pub batch_id: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub size: i32,
#[prost(message, repeated, tag = "4")]
pub txs: ::prost::alloc::vec::Vec<super::common::Transaction>,
#[prost(map = "string, int32", tag = "5")]
pub tx_ids_map: ::std::collections::HashMap<::prost::alloc::string::String, i32>,
#[prost(message, optional, tag = "6")]
pub endorsement: ::core::option::Option<super::common::EndorsementEntry>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxRecoverRequest {
#[prost(string, tag = "1")]
pub node_id: ::prost::alloc::string::String,
#[prost(uint64, tag = "2")]
pub height: u64,
#[prost(string, repeated, tag = "3")]
pub tx_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxRecoverResponse {
#[prost(string, tag = "1")]
pub node_id: ::prost::alloc::string::String,
#[prost(uint64, tag = "2")]
pub height: u64,
#[prost(message, repeated, tag = "3")]
pub txs: ::prost::alloc::vec::Vec<super::common::Transaction>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxBatchRecoverRequest {
#[prost(string, tag = "1")]
pub node_id: ::prost::alloc::string::String,
#[prost(uint64, tag = "2")]
pub height: u64,
#[prost(string, repeated, tag = "3")]
pub batch_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxBatchRecoverResponse {
#[prost(string, tag = "1")]
pub node_id: ::prost::alloc::string::String,
#[prost(uint64, tag = "2")]
pub height: u64,
#[prost(message, repeated, tag = "3")]
pub tx_batches: ::prost::alloc::vec::Vec<TxBatch>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPoolStatusRequest {
#[prost(string, tag = "1")]
pub chain_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTxIdsByTypeAndStageRequest {
#[prost(string, tag = "1")]
pub chain_id: ::prost::alloc::string::String,
#[prost(enumeration = "TxType", tag = "2")]
pub tx_type: i32,
#[prost(enumeration = "TxStage", tag = "3")]
pub tx_stage: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTxIdsByTypeAndStageResponse {
#[prost(string, repeated, tag = "1")]
pub tx_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTxsInPoolByTxIdsRequest {
#[prost(string, tag = "1")]
pub chain_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub tx_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTxsInPoolByTxIdsResponse {
#[prost(message, repeated, tag = "1")]
pub txs: ::prost::alloc::vec::Vec<super::common::Transaction>,
#[prost(string, repeated, tag = "2")]
pub tx_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SignalType {
NoEvent = 0,
TransactionIncome = 1,
BlockPropose = 2,
}
impl SignalType {
pub fn as_str_name(&self) -> &'static str {
match self {
SignalType::NoEvent => "NO_EVENT",
SignalType::TransactionIncome => "TRANSACTION_INCOME",
SignalType::BlockPropose => "BLOCK_PROPOSE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"NO_EVENT" => Some(Self::NoEvent),
"TRANSACTION_INCOME" => Some(Self::TransactionIncome),
"BLOCK_PROPOSE" => Some(Self::BlockPropose),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TxType {
UnknownType = 0,
ConfigTx = 1,
CommonTx = 2,
AllType = 3,
}
impl TxType {
pub fn as_str_name(&self) -> &'static str {
match self {
TxType::UnknownType => "UNKNOWN_TYPE",
TxType::ConfigTx => "CONFIG_TX",
TxType::CommonTx => "COMMON_TX",
TxType::AllType => "ALL_TYPE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNKNOWN_TYPE" => Some(Self::UnknownType),
"CONFIG_TX" => Some(Self::ConfigTx),
"COMMON_TX" => Some(Self::CommonTx),
"ALL_TYPE" => Some(Self::AllType),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TxStage {
UnknownStage = 0,
InQueue = 1,
InPending = 2,
AllStage = 3,
}
impl TxStage {
pub fn as_str_name(&self) -> &'static str {
match self {
TxStage::UnknownStage => "UNKNOWN_STAGE",
TxStage::InQueue => "IN_QUEUE",
TxStage::InPending => "IN_PENDING",
TxStage::AllStage => "ALL_STAGE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNKNOWN_STAGE" => Some(Self::UnknownStage),
"IN_QUEUE" => Some(Self::InQueue),
"IN_PENDING" => Some(Self::InPending),
"ALL_STAGE" => Some(Self::AllStage),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TxPoolMsgType {
SingleTx = 0,
BatchTx = 1,
RecoverReq = 2,
RecoverResp = 3,
}
impl TxPoolMsgType {
pub fn as_str_name(&self) -> &'static str {
match self {
TxPoolMsgType::SingleTx => "SINGLE_TX",
TxPoolMsgType::BatchTx => "BATCH_TX",
TxPoolMsgType::RecoverReq => "RECOVER_REQ",
TxPoolMsgType::RecoverResp => "RECOVER_RESP",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SINGLE_TX" => Some(Self::SingleTx),
"BATCH_TX" => Some(Self::BatchTx),
"RECOVER_REQ" => Some(Self::RecoverReq),
"RECOVER_RESP" => Some(Self::RecoverResp),
_ => None,
}
}
}