pub struct VersionBitsConditionChecker { /* private fields */ }Expand description
| Class to implement versionbits logic. |
Implementations§
source§impl VersionBitsConditionChecker
impl VersionBitsConditionChecker
pub fn mask(&self, params: &ChainConsensusParams) -> u32
pub fn new(id: ConsensusDeploymentPos) -> Self
Trait Implementations§
source§impl AbstractThresholdConditionChecker for VersionBitsConditionChecker
impl AbstractThresholdConditionChecker for VersionBitsConditionChecker
source§fn get_state_for(
&self,
pindex_prev: *const BlockIndex,
params: &ChainConsensusParams,
cache: &mut ThresholdConditionCache
) -> ThresholdState
fn get_state_for( &self, pindex_prev: *const BlockIndex, params: &ChainConsensusParams, cache: &mut ThresholdConditionCache ) -> ThresholdState
| Returns the state for pindex A based
| on parent pindexPrev B. Applies any
| state transition if conditions are
| present.
|
| Caches state from first block of period.
|
source§fn get_state_statistics_for(
&self,
pindex: *const BlockIndex,
params: &ChainConsensusParams
) -> BIP9Stats
fn get_state_statistics_for( &self, pindex: *const BlockIndex, params: &ChainConsensusParams ) -> BIP9Stats
| Returns the numerical statistics of
| an in-progress BIP9 softfork in the
| current period
|
source§fn get_state_since_height_for(
&self,
pindex_prev: *const BlockIndex,
params: &ChainConsensusParams,
cache: &mut ThresholdConditionCache
) -> i32
fn get_state_since_height_for( &self, pindex_prev: *const BlockIndex, params: &ChainConsensusParams, cache: &mut ThresholdConditionCache ) -> i32
| Returns the height since when the ThresholdState
| has started for pindex A based on parent
| pindexPrev B, all blocks of a period
| share the same
|
source§impl BeginTime for VersionBitsConditionChecker
impl BeginTime for VersionBitsConditionChecker
fn begin_time(&self, params: &ChainConsensusParams) -> i64
source§impl Condition for VersionBitsConditionChecker
impl Condition for VersionBitsConditionChecker
fn condition( &self, pindex: *const BlockIndex, params: &ChainConsensusParams ) -> bool
source§impl EndTime for VersionBitsConditionChecker
impl EndTime for VersionBitsConditionChecker
fn end_time(&self, params: &ChainConsensusParams) -> i64
source§impl MinActivationHeight for VersionBitsConditionChecker
impl MinActivationHeight for VersionBitsConditionChecker
fn min_activation_height(&self, params: &ChainConsensusParams) -> i32
source§impl Period for VersionBitsConditionChecker
impl Period for VersionBitsConditionChecker
fn period(&self, params: &ChainConsensusParams) -> i32
source§impl Threshold for VersionBitsConditionChecker
impl Threshold for VersionBitsConditionChecker
fn threshold(&self, params: &ChainConsensusParams) -> i32
impl Interface for VersionBitsConditionChecker
Auto Trait Implementations§
impl RefUnwindSafe for VersionBitsConditionChecker
impl Send for VersionBitsConditionChecker
impl Sync for VersionBitsConditionChecker
impl Unpin for VersionBitsConditionChecker
impl UnwindSafe for VersionBitsConditionChecker
Blanket Implementations§
§impl<T, U> CastInto<U> for Twhere
U: CastFrom<T>,
impl<T, U> CastInto<U> for Twhere U: CastFrom<T>,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> StaticUpcast<T> for T
impl<T> StaticUpcast<T> for T
§unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
Convert type of a const pointer. Read more