Allow changing BIP9 parameters on regtest

This commit is contained in:
Suhas Daftuar
2016-07-25 17:22:37 -04:00
committed by lateminer
parent c5e913fd28
commit 872628a702
3 changed files with 52 additions and 1 deletions

View File

@@ -340,6 +340,12 @@ public:
fTestnetToBeDeprecatedFieldRPC = false;
}
void UpdateBIP9Parameters(Consensus::DeploymentPos d, int64_t nStartTime, int64_t nTimeout)
{
consensus.vDeployments[d].nStartTime = nStartTime;
consensus.vDeployments[d].nTimeout = nTimeout;
}
};
static CRegTestParams regTestParams;
@@ -370,3 +376,7 @@ void SelectParams(const std::string& network)
pCurrentParams = &Params(network);
}
void UpdateRegtestBIP9Parameters(Consensus::DeploymentPos d, int64_t nStartTime, int64_t nTimeout)
{
regTestParams.UpdateBIP9Parameters(d, nStartTime, nTimeout);
}