From b0461542bd397d87b1b585e1692fb209af81184c Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Mon, 23 Oct 2023 15:03:45 +0300 Subject: [PATCH] fix: tweak sb params on regtest --- src/chainparams.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 0cacdb802e40fa..add9fdd075acd2 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -219,6 +219,7 @@ class CMainParams : public CChainParams { consensus.vDeployments[Consensus::DEPLOYMENT_MN_RR].bit = 10; consensus.vDeployments[Consensus::DEPLOYMENT_MN_RR].nStartTime = 19999999999; // TODO: To be determined later consensus.vDeployments[Consensus::DEPLOYMENT_MN_RR].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT; + // NOTE: nWindowSize for MN_RR __MUST__ be greater than or equal to nSuperblockMaturityWindow for CSuperblock::GetPaymentsLimit() to work correctly consensus.vDeployments[Consensus::DEPLOYMENT_MN_RR].nWindowSize = 4032; // TODO to be determined before v20 release: choose nWindowSize/nThresholdStart/nThresholdMin consensus.vDeployments[Consensus::DEPLOYMENT_MN_RR].nThresholdStart = 3226; // 80% of 4032 consensus.vDeployments[Consensus::DEPLOYMENT_MN_RR].nThresholdMin = 2420; // 60% of 4032 @@ -794,8 +795,8 @@ class CRegTestParams : public CChainParams { consensus.nBudgetPaymentsWindowBlocks = 10; consensus.nSuperblockStartBlock = 1500; consensus.nSuperblockStartHash = uint256(); // do not check this on regtest - consensus.nSuperblockCycle = 10; - consensus.nSuperblockMaturityWindow = 2; + consensus.nSuperblockCycle = 20; + consensus.nSuperblockMaturityWindow = 10; consensus.nGovernanceMinQuorum = 1; consensus.nGovernanceFilterElements = 100; consensus.nMasternodeMinimumConfirmations = 1;