From: alexhz Date: Mon, 15 Apr 2013 17:53:31 +0000 (+0000) Subject: Fix minimum PoS difficulty at 0.25 for testnet X-Git-Tag: v0.4.0-unstable~8 X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=commitdiff_plain;h=b22972d5277a280f79a1c4bbf212a3871741fa3c Fix minimum PoS difficulty at 0.25 for testnet --- diff --git a/src/main.cpp b/src/main.cpp index a14bf46..ff6f2bd 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -925,10 +925,15 @@ unsigned int static GetNextTargetRequired(const CBlockIndex* pindexLast, bool fP if(fProofOfStake) { // Proof-of-Stake blocks has own target limit since nVersion=3 supermajority on mainNet and always on testNet - if(fTestNet || (pindexLast->nHeight + 1 > 15000)) - bnTargetLimit = bnProofOfStakeLimit; - else if(pindexLast->nHeight + 1 > 14060) + if(fTestNet) bnTargetLimit = bnProofOfStakeHardLimit; + else + { + if(pindexLast->nHeight + 1 > 15000) + bnTargetLimit = bnProofOfStakeLimit; + else if(pindexLast->nHeight + 1 > 14060) + bnTargetLimit = bnProofOfStakeHardLimit; + } } if (pindexLast == NULL) @@ -1972,7 +1977,7 @@ bool CBlock::AcceptBlock() return error("AcceptBlock() : rejected by synchronized checkpoint"); // Reject block.nVersion < 3 blocks since 95% threshold on mainNet and always on testNet: - if (nVersion < 3 && ((!fTestNet && nHeight > 14060) || (fTestNet && nHeight > 0))) + if (nVersion < 3 && (nHeight > 14060)) return error("CheckBlock() : rejected nVersion < 3 block"); CScript expect = CScript() << nHeight;