Skip to content

Commit

Permalink
Merge #912: Specify BIP9 deployment for DynaFed
Browse files Browse the repository at this point in the history
afcb71f Speficy dynafed deployment for Liquidv1 (Steven Roose)
7208d5b Add comment to BIP9 time fields (Steven Roose)
fa3a74b Move dynafed bit into the ELEMENTS fields (Steven Roose)

Pull request description:

  Bit: 25 (identical to current elementsregtest dynafed bit)
  Start: block 1,000,000 (recent past)
  Timeout: never

Tree-SHA512: 4fb79e7623ffefdc644d1de75d18b368f1cee755a3a9db66d99021f047064e30f10fbcc450a3318f22f2dddd5101a7fe16edd3d888428a1ad68594f718b28750
  • Loading branch information
stevenroose committed Oct 6, 2020
2 parents e620722 + afcb71f commit 88067dd
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 @@ -861,9 +861,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 88067dd

Please sign in to comment.