pub enum ProposedBatchState<N: Network> {
None,
Certifying(Box<Proposal<N>>),
Certified(Field<N>),
}Expand description
The state of the primary’s batch proposal.
Variants§
None
No batch is currently being proposed.
Certifying(Box<Proposal<N>>)
A batch is being proposed and awaiting signatures.
Certified(Field<N>)
A batch has reached quorum and is being inserted into storage. Carries the batch ID so late-arriving signatures can be recognized and silently dropped.
Implementations§
Source§impl<N: Network> ProposedBatchState<N>
impl<N: Network> ProposedBatchState<N>
Sourcepub fn is_proposed(&self) -> bool
pub fn is_proposed(&self) -> bool
Returns true if a batch is currently being proposed (awaiting signatures).
Sourcepub fn as_proposal(&self) -> Option<&Proposal<N>>
pub fn as_proposal(&self) -> Option<&Proposal<N>>
Returns a reference to the in-progress proposal, or None if not in the Certifying state.
Trait Implementations§
Source§impl<N: Network> Default for ProposedBatchState<N>
impl<N: Network> Default for ProposedBatchState<N>
Source§impl<N: PartialEq + Network> PartialEq for ProposedBatchState<N>
impl<N: PartialEq + Network> PartialEq for ProposedBatchState<N>
Source§fn eq(&self, other: &ProposedBatchState<N>) -> bool
fn eq(&self, other: &ProposedBatchState<N>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<N: Eq + Network> Eq for ProposedBatchState<N>
impl<N: Network> StructuralPartialEq for ProposedBatchState<N>
Auto Trait Implementations§
impl<N> Freeze for ProposedBatchState<N>
impl<N> RefUnwindSafe for ProposedBatchState<N>where
<N as Environment>::Field: RefUnwindSafe,
<N as Environment>::Projective: RefUnwindSafe,
<N as Environment>::Scalar: RefUnwindSafe,
<N as Network>::TransmissionChecksum: RefUnwindSafe,
<N as Network>::TransactionID: RefUnwindSafe,
N: RefUnwindSafe,
<N as Network>::BlockHash: RefUnwindSafe,
<N as Network>::StateRoot: RefUnwindSafe,
<N as Network>::TransitionID: RefUnwindSafe,
<<N as Environment>::PairingCurve as PairingEngine>::G1Affine: RefUnwindSafe,
impl<N> Send for ProposedBatchState<N>
impl<N> Sync for ProposedBatchState<N>
impl<N> Unpin for ProposedBatchState<N>
impl<N> UnsafeUnpin for ProposedBatchState<N>
impl<N> UnwindSafe for ProposedBatchState<N>where
<N as Environment>::Field: UnwindSafe,
<N as Environment>::Projective: UnwindSafe,
<N as Environment>::Scalar: UnwindSafe,
<N as Network>::TransmissionChecksum: UnwindSafe,
<N as Network>::TransactionID: UnwindSafe,
N: UnwindSafe,
<N as Network>::BlockHash: UnwindSafe,
<N as Network>::StateRoot: UnwindSafe,
<N as Network>::TransitionID: UnwindSafe,
<<N as Environment>::PairingCurve as PairingEngine>::G1Affine: UnwindSafe + RefUnwindSafe,
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
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more