pub trait AbstractThresholdConditionChecker: Interface {
    // Provided methods
    fn get_state_for(
        &self,
        pindex_prev: *const BlockIndex,
        params: &ChainConsensusParams,
        cache: &mut ThresholdConditionCache
    ) -> ThresholdState { ... }
    fn get_state_statistics_for(
        &self,
        pindex: *const BlockIndex,
        params: &ChainConsensusParams
    ) -> BIP9Stats { ... }
    fn get_state_since_height_for(
        &self,
        pindex_prev: *const BlockIndex,
        params: &ChainConsensusParams,
        cache: &mut ThresholdConditionCache
    ) -> i32 { ... }
}
Expand description

| Abstract class that implements BIP9-style | threshold logic, and caches results. |

Provided Methods§

source

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

| 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

| 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 |

Implementors§