diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 82d60af31..f85786be7 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -509,7 +509,6 @@ public: void UpdateRegtestPow(int64_t nPowMaxAdjustDown, int64_t nPowMaxAdjustUp, uint256 powLimit) { - assert(strNetworkID == "regtest"); consensus.nPowMaxAdjustDown = nPowMaxAdjustDown; consensus.nPowMaxAdjustUp = nPowMaxAdjustUp; consensus.powLimit = powLimit; diff --git a/src/consensus/params.h b/src/consensus/params.h index 8644b087f..5599d6cbe 100644 --- a/src/consensus/params.h +++ b/src/consensus/params.h @@ -68,6 +68,7 @@ static_assert(POST_BLOSSOM_POW_TARGET_SPACING < PRE_BLOSSOM_POW_TARGET_SPACING, static const unsigned int PRE_BLOSSOM_HALVING_INTERVAL = 840000; static const unsigned int PRE_BLOSSOM_REGTEST_HALVING_INTERVAL = 150; static const int BLOSSOM_POW_TARGET_SPACING_RATIO = PRE_BLOSSOM_POW_TARGET_SPACING / POST_BLOSSOM_POW_TARGET_SPACING; +static_assert(BLOSSOM_POW_TARGET_SPACING_RATIO * POST_BLOSSOM_POW_TARGET_SPACING == PRE_BLOSSOM_POW_TARGET_SPACING, "Invalid BLOSSOM_POW_TARGET_SPACING_RATIO"); static const unsigned int POST_BLOSSOM_HALVING_INTERVAL = PRE_BLOSSOM_HALVING_INTERVAL * BLOSSOM_POW_TARGET_SPACING_RATIO; static const unsigned int POST_BLOSSOM_REGTEST_HALVING_INTERVAL = PRE_BLOSSOM_REGTEST_HALVING_INTERVAL * BLOSSOM_POW_TARGET_SPACING_RATIO;