mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Add inactive versionbits dynafed deployment
This commit is contained in:
parent
0a8565bbf8
commit
918896d6ff
3 changed files with 10 additions and 0 deletions
|
|
@ -22,6 +22,7 @@ enum DeploymentPos
|
|||
DEPLOYMENT_TESTDUMMY,
|
||||
DEPLOYMENT_CSV, // Deployment of BIP68, BIP112, and BIP113.
|
||||
DEPLOYMENT_SEGWIT, // Deployment of BIP141, BIP143, and BIP147.
|
||||
DEPLOYMENT_DYNA_FED, // Deployment of dynamic federation
|
||||
// NOTE: Also add new deployments to VersionBitsDeploymentInfo in versionbits.cpp
|
||||
MAX_VERSION_BITS_DEPLOYMENTS
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3371,6 +3371,12 @@ bool IsNullDummyEnabled(const CBlockIndex* pindexPrev, const Consensus::Params&
|
|||
return (VersionBitsState(pindexPrev, params, Consensus::DEPLOYMENT_SEGWIT, versionbitscache) == ThresholdState::ACTIVE);
|
||||
}
|
||||
|
||||
bool IsDynaFedEnabled(const CBlockIndex* pindexPrev, const Consensus::Params& params)
|
||||
{
|
||||
LOCK(cs_main);
|
||||
return (VersionBitsState(pindexPrev, params, Consensus::DEPLOYMENT_DYNA_FED, versionbitscache) == ThresholdState::ACTIVE);
|
||||
}
|
||||
|
||||
// Compute at which vout of the block's coinbase transaction the witness
|
||||
// commitment occurs, or -1 if not found.
|
||||
static int GetWitnessCommitmentIndex(const CBlock& block)
|
||||
|
|
|
|||
|
|
@ -410,6 +410,9 @@ bool IsWitnessEnabled(const CBlockIndex* pindexPrev, const Consensus::Params& pa
|
|||
/** Check whether NULLDUMMY (BIP 147) has activated. */
|
||||
bool IsNullDummyEnabled(const CBlockIndex* pindexPrev, const Consensus::Params& params);
|
||||
|
||||
/** Check whether Dynamic Federation has activated. */
|
||||
bool IsDynaFedEnabled(const CBlockIndex* pindexPrev, const Consensus::Params& params);
|
||||
|
||||
/** When there are blocks in the active chain with missing data, rewind the chainstate and remove them from the block index */
|
||||
bool RewindBlockIndex(const CChainParams& params);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue