Skip to content

Commit

Permalink
Merge #918: [0.18 backport] Backport #912: Specify BIP9 deployment fo…
Browse files Browse the repository at this point in the history
…r DynaFed

47bc28a Speficy dynafed deployment for Liquidv1 (Steven Roose)
385b670 Add comment to BIP9 time fields (Steven Roose)
6f70350 Move dynafed bit into the ELEMENTS fields (Steven Roose)

Pull request description:

Tree-SHA512: 12710e8fd04a3753d1afc26a81f62cdef66449071da00ca39854b1cd66c4002669c26e4db0a64636f3458206d451055ddbaeb66e4fc847166b57968cd2ce59e2
  • Loading branch information
stevenroose committed Oct 6, 2020
2 parents a0bd887 + 47bc28a commit 2fd40d5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -613,17 +613,17 @@ class CCustomParams : public CRegTestParams {
consensus.subsidy_asset = CAsset(uint256S(gArgs.GetArg("-subsidyasset", "0x00")));
}

consensus.vDeployments[Consensus::DEPLOYMENT_DYNA_FED].bit = 25;
consensus.vDeployments[Consensus::DEPLOYMENT_DYNA_FED].nStartTime = args.GetArg("-con_dyna_deploy_start", Consensus::BIP9Deployment::ALWAYS_ACTIVE);
consensus.vDeployments[Consensus::DEPLOYMENT_DYNA_FED].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;

// END ELEMENTS fields

// CSV always active by default, unlike regtest
consensus.vDeployments[Consensus::DEPLOYMENT_CSV].bit = 0;
consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nStartTime = args.GetArg("-con_csv_deploy_start", Consensus::BIP9Deployment::ALWAYS_ACTIVE);
consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;

consensus.vDeployments[Consensus::DEPLOYMENT_DYNA_FED].bit = 25;
consensus.vDeployments[Consensus::DEPLOYMENT_DYNA_FED].nStartTime = args.GetArg("-con_dyna_deploy_start", Consensus::BIP9Deployment::ALWAYS_ACTIVE);
consensus.vDeployments[Consensus::DEPLOYMENT_DYNA_FED].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;

}

void SetGenesisBlock() {
Expand Down Expand Up @@ -883,9 +883,9 @@ class CLiquidV1Params : public CChainParams {
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;

// Not active yet.
consensus.vDeployments[Consensus::DEPLOYMENT_DYNA_FED].bit = 0;
consensus.vDeployments[Consensus::DEPLOYMENT_DYNA_FED].nStartTime = 0;
consensus.vDeployments[Consensus::DEPLOYMENT_DYNA_FED].nTimeout = 0;
consensus.vDeployments[Consensus::DEPLOYMENT_DYNA_FED].bit = 25;
consensus.vDeployments[Consensus::DEPLOYMENT_DYNA_FED].nStartTime = 1000000;
consensus.vDeployments[Consensus::DEPLOYMENT_DYNA_FED].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;


// Finally, create genesis block
Expand Down
2 changes: 2 additions & 0 deletions src/consensus/params.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ struct BIP9Deployment {
/** Bit position to select the particular bit in nVersion. */
int bit;
/** Start MedianTime for version bits miner confirmation. Can be a date in the past */
// ELEMENTS: Interpreted as block height!
int64_t nStartTime;
/** Timeout/expiry MedianTime for the deployment attempt. */
// ELEMENTS: Interpreted as block height!
int64_t nTimeout;

/** Constant for nTimeout very far in the future. */
Expand Down

0 comments on commit 2fd40d5

Please sign in to comment.