Skip to content

Commit 918896d

Browse files
committed
Add inactive versionbits dynafed deployment
1 parent 0a8565b commit 918896d

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

src/consensus/params.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ enum DeploymentPos
2222
DEPLOYMENT_TESTDUMMY,
2323
DEPLOYMENT_CSV, // Deployment of BIP68, BIP112, and BIP113.
2424
DEPLOYMENT_SEGWIT, // Deployment of BIP141, BIP143, and BIP147.
25+
DEPLOYMENT_DYNA_FED, // Deployment of dynamic federation
2526
// NOTE: Also add new deployments to VersionBitsDeploymentInfo in versionbits.cpp
2627
MAX_VERSION_BITS_DEPLOYMENTS
2728
};

src/validation.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3371,6 +3371,12 @@ bool IsNullDummyEnabled(const CBlockIndex* pindexPrev, const Consensus::Params&
33713371
return (VersionBitsState(pindexPrev, params, Consensus::DEPLOYMENT_SEGWIT, versionbitscache) == ThresholdState::ACTIVE);
33723372
}
33733373

3374+
bool IsDynaFedEnabled(const CBlockIndex* pindexPrev, const Consensus::Params& params)
3375+
{
3376+
LOCK(cs_main);
3377+
return (VersionBitsState(pindexPrev, params, Consensus::DEPLOYMENT_DYNA_FED, versionbitscache) == ThresholdState::ACTIVE);
3378+
}
3379+
33743380
// Compute at which vout of the block's coinbase transaction the witness
33753381
// commitment occurs, or -1 if not found.
33763382
static int GetWitnessCommitmentIndex(const CBlock& block)

src/validation.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,9 @@ bool IsWitnessEnabled(const CBlockIndex* pindexPrev, const Consensus::Params& pa
410410
/** Check whether NULLDUMMY (BIP 147) has activated. */
411411
bool IsNullDummyEnabled(const CBlockIndex* pindexPrev, const Consensus::Params& params);
412412

413+
/** Check whether Dynamic Federation has activated. */
414+
bool IsDynaFedEnabled(const CBlockIndex* pindexPrev, const Consensus::Params& params);
415+
413416
/** When there are blocks in the active chain with missing data, rewind the chainstate and remove them from the block index */
414417
bool RewindBlockIndex(const CChainParams& params);
415418

0 commit comments

Comments
 (0)