Activate post-quantum rules at block 6000

This commit is contained in:
Capri 2026-09-01 08:46:18 +00:00
commit 2cf5c796dc
Signed by: VextaProject
SSH key fingerprint: SHA256:739BZv8LvIDY2tR7lXLy/IQ6MaGTQtYcG9GNvCjmpVM
4 changed files with 22 additions and 7 deletions

View file

@ -193,6 +193,11 @@ public:
ThresholdState VersionBitsCache::State(const CBlockIndex* pindexPrev, const Consensus::Params& params, Consensus::DeploymentPos pos)
{
if (pos == Consensus::DEPLOYMENT_PQR) {
const int next_height = pindexPrev ? pindexPrev->nHeight + 1 : 0;
return next_height >= params.vDeployments[pos].min_activation_height ? ThresholdState::ACTIVE : ThresholdState::DEFINED;
}
LOCK(m_mutex);
return VersionBitsConditionChecker(pos).GetStateFor(pindexPrev, params, m_caches[pos]);
}
@ -204,6 +209,11 @@ BIP9Stats VersionBitsCache::Statistics(const CBlockIndex* pindexPrev, const Cons
int VersionBitsCache::StateSinceHeight(const CBlockIndex* pindexPrev, const Consensus::Params& params, Consensus::DeploymentPos pos)
{
if (pos == Consensus::DEPLOYMENT_PQR) {
const int next_height = pindexPrev ? pindexPrev->nHeight + 1 : 0;
return next_height >= params.vDeployments[pos].min_activation_height ? params.vDeployments[pos].min_activation_height : 0;
}
LOCK(m_mutex);
return VersionBitsConditionChecker(pos).GetStateSinceHeightFor(pindexPrev, params, m_caches[pos]);
}