diff options
| author | Gavin Andresen <[email protected]> | 2012-04-13 14:38:05 -0400 |
|---|---|---|
| committer | Gavin Andresen <[email protected]> | 2012-05-25 14:36:40 -0400 |
| commit | 248bceb30c9ff3100f11a4755d8f0832f5189c14 (patch) | |
| tree | f843274398411b4c9eb26ab832448722f3c01567 /src/main.cpp | |
| parent | Testnet, Mark III (diff) | |
| download | discoin-248bceb30c9ff3100f11a4755d8f0832f5189c14.tar.xz discoin-248bceb30c9ff3100f11a4755d8f0832f5189c14.zip | |
Fix issue#1082, testnet difficulty unsigned integer underflow
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index dd1a7b900..baffffd3b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -865,12 +865,12 @@ unsigned int static GetNextWorkRequired(const CBlockIndex* pindexLast, const CBl // Only change once per interval if ((pindexLast->nHeight+1) % nInterval != 0) { - // Special rules for testnet after 15 Feb 2012: - if (fTestNet && pblock->nTime > 1329264000) + // Special difficulty rule for testnet: + if (fTestNet) { // If the new block's timestamp is more than 2* 10 minutes // then allow mining of a min-difficulty block. - if (pblock->nTime - pindexLast->nTime > nTargetSpacing*2) + if (pblock->nTime > pindexLast->nTime + nTargetSpacing*2) return nProofOfWorkLimit; else { |