#[repr(u8)]pub enum ThresholdState {
Defined = 0,
Started = 1,
LockedIn = 2,
Active = 3,
Failed = 4,
}Expand description
RFC0043 defines a finite-state-machine to deploy a soft fork in multiple stages. State transitions happen during epoch if conditions are met In case of reorg, transitions can go backward. Without transition, state is inherited between epochs. All blocks of a epoch share the same state.
Variants§
Defined = 0
First state that each softfork starts. The 0 epoch is by definition in this state for each deployment.
Started = 1
For epochs past the start epoch.
LockedIn = 2
For one epoch after the first epoch period with STARTED epochs of
which at least threshold has the associated bit set in version.
Active = 3
For all epochs after the LOCKED_IN epoch.
Failed = 4
For one epoch period past the timeout_epoch, if LOCKED_IN was not reached.
Trait Implementations§
Source§impl Clone for ThresholdState
impl Clone for ThresholdState
Source§fn clone(&self) -> ThresholdState
fn clone(&self) -> ThresholdState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ThresholdState
impl Debug for ThresholdState
Source§impl From<ThresholdState> for DeploymentState
impl From<ThresholdState> for DeploymentState
Source§fn from(state: ThresholdState) -> Self
fn from(state: ThresholdState) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ThresholdState
impl PartialEq for ThresholdState
impl Copy for ThresholdState
impl Eq for ThresholdState
impl StructuralPartialEq for ThresholdState
Auto Trait Implementations§
impl Freeze for ThresholdState
impl RefUnwindSafe for ThresholdState
impl Send for ThresholdState
impl Sync for ThresholdState
impl Unpin for ThresholdState
impl UnwindSafe for ThresholdState
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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