]> Git Repo - VerusCoin.git/blobdiff - src/chainparams.cpp
Allow changing network upgrade parameters on regtest
[VerusCoin.git] / src / chainparams.cpp
index fd928318d163dc011d9f4bb1d7024717838a5149..65bc5577c598b16b5035dcc5f7ec07d5f4ae15cd 100644 (file)
@@ -402,6 +402,12 @@ public:
         vFoundersRewardAddress = { "t2FwcEhFdNXuFMv1tcYwaBJtYVtMj8b1uTg" };
         assert(vFoundersRewardAddress.size() <= consensus.GetLastFoundersRewardBlockHeight());
     }
+
+    void UpdateNetworkUpgradeParameters(Consensus::UpgradeIndex idx, int nActivationHeight)
+    {
+        assert(idx > Consensus::BASE_SPROUT && idx < Consensus::MAX_NETWORK_UPGRADES);
+        consensus.vUpgrades[idx].nActivationHeight = nActivationHeight;
+    }
 };
 static CRegTestParams regTestParams;
 
@@ -475,3 +481,8 @@ std::string CChainParams::GetFoundersRewardAddressAtIndex(int i) const {
     assert(i >= 0 && i < vFoundersRewardAddress.size());
     return vFoundersRewardAddress[i];
 }
+
+void UpdateNetworkUpgradeParameters(Consensus::UpgradeIndex idx, int nActivationHeight)
+{
+    regTestParams.UpdateNetworkUpgradeParameters(idx, nActivationHeight);
+}
This page took 0.021699 seconds and 4 git commands to generate.