pub struct ConsensusQueue {
pub block: RequestBeginBlock,
pub txs: Vec<RequestDeliverTx>,
pub state: ConsensusState,
pub packet: Option<Request>,
pub flushed: bool,
}
Fields§
§block: RequestBeginBlock
§txs: Vec<RequestDeliverTx>
§state: ConsensusState
§packet: Option<Request>
§flushed: bool
Implementations§
Source§impl ConsensusQueue
impl ConsensusQueue
pub fn new(pkt: Request) -> Result<Self>
pub fn is_consensus(pkt: &Request) -> bool
pub fn is_deliver_block(&self) -> bool
pub fn is_sendable(&self) -> bool
pub fn is_begin_block_flush(&self) -> bool
pub fn is_commit(&self) -> bool
pub fn is_commit_flush(&self) -> bool
pub fn add_pkt(&mut self, pkt: Request) -> Result<()>
pub fn to_block(&mut self) -> Result<RequestFinalizedBlock>
pub fn to_packet(&mut self) -> Result<Request>
Trait Implementations§
Source§impl Default for ConsensusQueue
impl Default for ConsensusQueue
Source§fn default() -> ConsensusQueue
fn default() -> ConsensusQueue
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ConsensusQueue
impl RefUnwindSafe for ConsensusQueue
impl Send for ConsensusQueue
impl Sync for ConsensusQueue
impl Unpin for ConsensusQueue
impl UnwindSafe for ConsensusQueue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more