Skip to content

Commit

Permalink
Use smaller LLMQs for ChainLocks on testnet and devnet (#2669)
Browse files Browse the repository at this point in the history
* Move llmqChainLocks initialization closer to other LLMQ related assignments

* Use smaller LLMQs for ChainLocks on testnet and devnet

We very often don't have enough MNs on testnet so we should use a smaller
quorum quorum for ChainLocks.
  • Loading branch information
codablock authored and UdjinM6 committed Jan 30, 2019
1 parent 54f576e commit 6da3413
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ class CMainParams : public CChainParams {
consensus.llmqs[Consensus::LLMQ_50_60] = llmq50_60;
consensus.llmqs[Consensus::LLMQ_400_60] = llmq400_60;
consensus.llmqs[Consensus::LLMQ_400_85] = llmq400_85;
consensus.llmqChainLocks = Consensus::LLMQ_400_60;

fMiningRequiresPeers = true;
fDefaultConsistencyChecks = false;
Expand All @@ -331,7 +332,6 @@ class CMainParams : public CChainParams {
vSporkAddresses = {"Xgtyuk76vhuFW2iT7UAiHgNdWXCf3J34wh"};
nMinSporkKeys = 1;
fBIP9CheckMasternodesUpgraded = true;
consensus.llmqChainLocks = Consensus::LLMQ_400_60;

checkpointData = (CCheckpointData) {
boost::assign::map_list_of
Expand Down Expand Up @@ -483,6 +483,7 @@ class CTestNetParams : public CChainParams {
consensus.llmqs[Consensus::LLMQ_50_60] = llmq50_60;
consensus.llmqs[Consensus::LLMQ_400_60] = llmq400_60;
consensus.llmqs[Consensus::LLMQ_400_85] = llmq400_85;
consensus.llmqChainLocks = Consensus::LLMQ_50_60;

fMiningRequiresPeers = true;
fDefaultConsistencyChecks = false;
Expand All @@ -499,7 +500,6 @@ class CTestNetParams : public CChainParams {
vSporkAddresses = {"yjPtiKh2uwk3bDutTEA2q9mCtXyiZRWn55"};
nMinSporkKeys = 1;
fBIP9CheckMasternodesUpgraded = true;
consensus.llmqChainLocks = Consensus::LLMQ_400_60;

checkpointData = (CCheckpointData) {
boost::assign::map_list_of
Expand Down Expand Up @@ -630,6 +630,7 @@ class CDevNetParams : public CChainParams {
consensus.llmqs[Consensus::LLMQ_50_60] = llmq50_60;
consensus.llmqs[Consensus::LLMQ_400_60] = llmq400_60;
consensus.llmqs[Consensus::LLMQ_400_85] = llmq400_85;
consensus.llmqChainLocks = Consensus::LLMQ_50_60;

fMiningRequiresPeers = true;
fDefaultConsistencyChecks = false;
Expand All @@ -646,7 +647,6 @@ class CDevNetParams : public CChainParams {
nMinSporkKeys = 1;
// devnets are started with no blocks and no MN, so we can't check for upgraded MN (as there are none)
fBIP9CheckMasternodesUpgraded = false;
consensus.llmqChainLocks = Consensus::LLMQ_400_60;

checkpointData = (CCheckpointData) {
boost::assign::map_list_of
Expand Down Expand Up @@ -761,7 +761,6 @@ class CRegTestParams : public CChainParams {
nMinSporkKeys = 1;
// regtest usually has no masternodes in most tests, so don't check for upgraged MNs
fBIP9CheckMasternodesUpgraded = false;
consensus.llmqChainLocks = Consensus::LLMQ_10_60;

checkpointData = (CCheckpointData){
boost::assign::map_list_of
Expand Down Expand Up @@ -791,6 +790,7 @@ class CRegTestParams : public CChainParams {
// long living quorum params
consensus.llmqs[Consensus::LLMQ_10_60] = llmq10_60;
consensus.llmqs[Consensus::LLMQ_50_60] = llmq50_60;
consensus.llmqChainLocks = Consensus::LLMQ_10_60;
}

void UpdateBIP9Parameters(Consensus::DeploymentPos d, int64_t nStartTime, int64_t nTimeout, int64_t nWindowSize, int64_t nThreshold)
Expand Down

0 comments on commit 6da3413

Please sign in to comment.