Struct bitcoin_txmempool::VersionBitsCache
source · pub struct VersionBitsCache { /* private fields */ }Expand description
| BIP 9 allows multiple softforks to be | deployed in parallel. We cache per-period | state for every one of them. |
Implementations§
source§impl VersionBitsCache
impl VersionBitsCache
sourcepub fn state(
&mut self,
pindex_prev: *const BlockIndex,
params: &ChainConsensusParams,
pos: ConsensusDeploymentPos
) -> ThresholdState
pub fn state( &mut self, pindex_prev: *const BlockIndex, params: &ChainConsensusParams, pos: ConsensusDeploymentPos ) -> ThresholdState
| Get the BIP9 state for a given deployment | for the block after pindexPrev. |
sourcepub fn statistics(
&mut self,
pindex_prev: *const BlockIndex,
params: &ChainConsensusParams,
pos: ConsensusDeploymentPos
) -> BIP9Stats
pub fn statistics( &mut self, pindex_prev: *const BlockIndex, params: &ChainConsensusParams, pos: ConsensusDeploymentPos ) -> BIP9Stats
| Get the numerical statistics for a given | deployment for the signalling period | that includes the block after pindexPrev. |
sourcepub fn state_since_height(
&mut self,
pindex_prev: *const BlockIndex,
params: &ChainConsensusParams,
pos: ConsensusDeploymentPos
) -> i32
pub fn state_since_height( &mut self, pindex_prev: *const BlockIndex, params: &ChainConsensusParams, pos: ConsensusDeploymentPos ) -> i32
| Get the block height at which the BIP9 | deployment switched into the state | for the block after pindexPrev. |
pub fn mask( &mut self, params: &ChainConsensusParams, pos: ConsensusDeploymentPos ) -> u32
sourcepub fn compute_block_version(
&mut self,
pindex_prev: *const BlockIndex,
params: &ChainConsensusParams
) -> i32
pub fn compute_block_version( &mut self, pindex_prev: *const BlockIndex, params: &ChainConsensusParams ) -> i32
| Determine what nVersion a new block | should use |
pub fn clear(&mut self)
Auto Trait Implementations§
impl RefUnwindSafe for VersionBitsCache
impl !Send for VersionBitsCache
impl !Sync for VersionBitsCache
impl Unpin for VersionBitsCache
impl UnwindSafe for VersionBitsCache
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