mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 21:12:48 +01:00
Use chainparams factory for devnet (#3087)
This commit is contained in:
parent
ac90abe892
commit
0d126c2ae4
@ -106,6 +106,17 @@ void CChainParams::UpdateBudgetParameters(int nMasternodePaymentsStartBlock, int
|
|||||||
consensus.nSuperblockStartBlock = nSuperblockStartBlock;
|
consensus.nSuperblockStartBlock = nSuperblockStartBlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CChainParams::UpdateSubsidyAndDiffParams(int nMinimumDifficultyBlocks, int nHighSubsidyBlocks, int nHighSubsidyFactor)
|
||||||
|
{
|
||||||
|
consensus.nMinimumDifficultyBlocks = nMinimumDifficultyBlocks;
|
||||||
|
consensus.nHighSubsidyBlocks = nHighSubsidyBlocks;
|
||||||
|
consensus.nHighSubsidyFactor = nHighSubsidyFactor;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CChainParams::UpdateLLMQChainLocks(Consensus::LLMQType llmqType) {
|
||||||
|
consensus.llmqChainLocks = llmqType;
|
||||||
|
}
|
||||||
|
|
||||||
static CBlock FindDevNetGenesisBlock(const Consensus::Params& params, const CBlock &prevBlock, const CAmount& reward)
|
static CBlock FindDevNetGenesisBlock(const Consensus::Params& params, const CBlock &prevBlock, const CAmount& reward)
|
||||||
{
|
{
|
||||||
std::string devNetName = GetDevNetName();
|
std::string devNetName = GetDevNetName();
|
||||||
@ -699,20 +710,7 @@ public:
|
|||||||
0.01 // * estimated number of transactions per second
|
0.01 // * estimated number of transactions per second
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateSubsidyAndDiffParams(int nMinimumDifficultyBlocks, int nHighSubsidyBlocks, int nHighSubsidyFactor)
|
|
||||||
{
|
|
||||||
consensus.nMinimumDifficultyBlocks = nMinimumDifficultyBlocks;
|
|
||||||
consensus.nHighSubsidyBlocks = nHighSubsidyBlocks;
|
|
||||||
consensus.nHighSubsidyFactor = nHighSubsidyFactor;
|
|
||||||
}
|
|
||||||
|
|
||||||
void UpdateLLMQChainLocks(Consensus::LLMQType llmqType) {
|
|
||||||
consensus.llmqChainLocks = llmqType;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
static CDevNetParams *devNetParams;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Regression test
|
* Regression test
|
||||||
@ -887,12 +885,10 @@ void UpdateBudgetParameters(int nMasternodePaymentsStartBlock, int nBudgetPaymen
|
|||||||
|
|
||||||
void UpdateDevnetSubsidyAndDiffParams(int nMinimumDifficultyBlocks, int nHighSubsidyBlocks, int nHighSubsidyFactor)
|
void UpdateDevnetSubsidyAndDiffParams(int nMinimumDifficultyBlocks, int nHighSubsidyBlocks, int nHighSubsidyFactor)
|
||||||
{
|
{
|
||||||
assert(devNetParams);
|
globalChainParams->UpdateSubsidyAndDiffParams(nMinimumDifficultyBlocks, nHighSubsidyBlocks, nHighSubsidyFactor);
|
||||||
devNetParams->UpdateSubsidyAndDiffParams(nMinimumDifficultyBlocks, nHighSubsidyBlocks, nHighSubsidyFactor);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateDevnetLLMQChainLocks(Consensus::LLMQType llmqType)
|
void UpdateDevnetLLMQChainLocks(Consensus::LLMQType llmqType)
|
||||||
{
|
{
|
||||||
assert(devNetParams);
|
globalChainParams->UpdateLLMQChainLocks(llmqType);
|
||||||
devNetParams->UpdateLLMQChainLocks(llmqType);
|
|
||||||
}
|
}
|
||||||
|
@ -87,6 +87,8 @@ public:
|
|||||||
void UpdateVersionBitsParameters(Consensus::DeploymentPos d, int64_t nStartTime, int64_t nTimeout, int64_t nWindowSize, int64_t nThreshold);
|
void UpdateVersionBitsParameters(Consensus::DeploymentPos d, int64_t nStartTime, int64_t nTimeout, int64_t nWindowSize, int64_t nThreshold);
|
||||||
void UpdateDIP3Parameters(int nActivationHeight, int nEnforcementHeight);
|
void UpdateDIP3Parameters(int nActivationHeight, int nEnforcementHeight);
|
||||||
void UpdateBudgetParameters(int nMasternodePaymentsStartBlock, int nBudgetPaymentsStartBlock, int nSuperblockStartBlock);
|
void UpdateBudgetParameters(int nMasternodePaymentsStartBlock, int nBudgetPaymentsStartBlock, int nSuperblockStartBlock);
|
||||||
|
void UpdateSubsidyAndDiffParams(int nMinimumDifficultyBlocks, int nHighSubsidyBlocks, int nHighSubsidyFactor);
|
||||||
|
void UpdateLLMQChainLocks(Consensus::LLMQType llmqType);
|
||||||
int PoolMinParticipants() const { return nPoolMinParticipants; }
|
int PoolMinParticipants() const { return nPoolMinParticipants; }
|
||||||
int PoolMaxParticipants() const { return nPoolMaxParticipants; }
|
int PoolMaxParticipants() const { return nPoolMaxParticipants; }
|
||||||
int FulfilledRequestExpireTime() const { return nFulfilledRequestExpireTime; }
|
int FulfilledRequestExpireTime() const { return nFulfilledRequestExpireTime; }
|
||||||
|
Loading…
Reference in New Issue
Block a user