![]() |
Bitcoin Core
29.1.0
P2P Digital Currency
|
BIP 9 allows multiple softforks to be deployed in parallel. More...
#include <versionbits.h>
Public Member Functions | |
| ThresholdState | State (const CBlockIndex *pindexPrev, const Consensus::Params ¶ms, Consensus::DeploymentPos pos) EXCLUSIVE_LOCKS_REQUIRED(!m_mutex) |
| Get the BIP9 state for a given deployment for the block after pindexPrev. More... | |
| int | StateSinceHeight (const CBlockIndex *pindexPrev, const Consensus::Params ¶ms, Consensus::DeploymentPos pos) EXCLUSIVE_LOCKS_REQUIRED(!m_mutex) |
| Get the block height at which the BIP9 deployment switched into the state for the block after pindexPrev. More... | |
| int32_t | ComputeBlockVersion (const CBlockIndex *pindexPrev, const Consensus::Params ¶ms) EXCLUSIVE_LOCKS_REQUIRED(!m_mutex) |
| Determine what nVersion a new block should use. More... | |
| void | Clear () EXCLUSIVE_LOCKS_REQUIRED(!m_mutex) |
Static Public Member Functions | |
| static BIP9Stats | Statistics (const CBlockIndex *pindex, const Consensus::Params ¶ms, Consensus::DeploymentPos pos, std::vector< bool > *signalling_blocks=nullptr) |
| Get the numerical statistics for a given deployment for the signalling period that includes pindex. More... | |
| static uint32_t | Mask (const Consensus::Params ¶ms, Consensus::DeploymentPos pos) |
Private Member Functions | |
| ThresholdConditionCache m_caches [Consensus::MAX_VERSION_BITS_DEPLOYMENTS] | GUARDED_BY (m_mutex) |
Private Attributes | |
| Mutex | m_mutex |
BIP 9 allows multiple softforks to be deployed in parallel.
We cache per-period state for every one of them.
Definition at line 80 of file versionbits.h.
| void VersionBitsCache::Clear | ( | ) |
| int32_t VersionBitsCache::ComputeBlockVersion | ( | const CBlockIndex * | pindexPrev, |
| const Consensus::Params & | params | ||
| ) |
Determine what nVersion a new block should use.
Definition at line 225 of file versionbits.cpp.
|
private |
|
static |
| ThresholdState VersionBitsCache::State | ( | const CBlockIndex * | pindexPrev, |
| const Consensus::Params & | params, | ||
| Consensus::DeploymentPos | pos | ||
| ) |
Get the BIP9 state for a given deployment for the block after pindexPrev.
Definition at line 203 of file versionbits.cpp.
| int VersionBitsCache::StateSinceHeight | ( | const CBlockIndex * | pindexPrev, |
| const Consensus::Params & | params, | ||
| Consensus::DeploymentPos | pos | ||
| ) |
Get the block height at which the BIP9 deployment switched into the state for the block after pindexPrev.
Definition at line 214 of file versionbits.cpp.
|
static |
Get the numerical statistics for a given deployment for the signalling period that includes pindex.
If provided, signalling_blocks is set to true/false based on whether each block in the period signalled
Definition at line 209 of file versionbits.cpp.
|
private |
Definition at line 83 of file versionbits.h.
1.8.14