message: allow regtest to retain same difficulty for tests to work properly
diff: #include <uint256.h>
  #include <bignum.h>
  -
  +#include <chainparams.h>
  // peercoin: find last block index up to pindex
  const CBlockIndex* GetLastBlockIndex(const CBlockIndex* pindex, bool fProofOfStake)
  @@ -39,10 +39,12 @@ unsigned int GetNextTargetRequired(const CBlockIndex* pindexLast, bool fProofOfS
  // peercoin: retarget with exponential moving toward target spacing
  CBigNum bnNew;
  bnNew.SetCompact(pindexPrev->nBits);
  + if (Params().NetworkIDString() != CBaseChainParams::REGTEST) {
  int64_t nTargetSpacing = fProofOfStake? params.nStakeTargetSpacing : std::min(params.nTargetSpacingWorkMax, params.nStakeTargetSpacing * (1 + pindexLast->nHeight - pindexPrev->nHeight));
  int64_t nInterval = params.nTargetTimespan / nTargetSpacing;
  bnNew *= ((nInterval - 1) * nTargetSpacing + nActualSpacing + nActualSpacing);
  bnNew /= ((nInterval + 1) * nTargetSpacing);
  + }
  if (bnNew > CBigNum(params.powLimit))
  bnNew = CBigNum(params.powLimit);
  