pub struct Deployment {
pub bit: u8,
pub start: EpochNumber,
pub timeout: EpochNumber,
pub min_activation_epoch: EpochNumber,
pub period: EpochNumber,
pub active_mode: ActiveMode,
pub threshold: Ratio,
}Expand description
Struct for each individual consensus rule change using soft fork.
Fields§
§bit: u8Determines which bit in the version field of the block is to be used to signal the softfork lock-in and activation.
It is chosen from the set {0,1,2,…,28}.
start: EpochNumberSpecifies the first epoch in which the bit gains meaning.
timeout: EpochNumberSpecifies an epoch at which the miner signaling ends. Once this epoch has been reached, if the softfork has not yet locked_in (excluding this epoch block’s bit state), the deployment is considered failed on all descendants of the block.
min_activation_epoch: EpochNumberSpecifies the epoch at which the softfork is allowed to become active.
period: EpochNumberSpecifies length of epochs of the signalling period.
active_mode: ActiveModeThis is useful for testing, as it means tests don’t need to deal with the activation process
threshold: RatioSpecifies the minimum ratio of block per period,
which indicate the locked_in of the softfork during the period.
Trait Implementations§
Source§impl Clone for Deployment
impl Clone for Deployment
Source§fn clone(&self) -> Deployment
fn clone(&self) -> Deployment
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Deployment
impl Debug for Deployment
Source§impl From<Deployment> for Deployment
impl From<Deployment> for Deployment
Source§fn from(deployment: Deployment) -> Self
fn from(deployment: Deployment) -> Self
Source§impl From<Deployment> for DeploymentInfo
impl From<Deployment> for DeploymentInfo
Source§fn from(deployment: Deployment) -> Self
fn from(deployment: Deployment) -> Self
Source§impl PartialEq for Deployment
impl PartialEq for Deployment
impl Eq for Deployment
impl StructuralPartialEq for Deployment
Auto Trait Implementations§
impl Freeze for Deployment
impl RefUnwindSafe for Deployment
impl Send for Deployment
impl Sync for Deployment
impl Unpin for Deployment
impl UnwindSafe for Deployment
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
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>
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>
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