aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Dashjr <[email protected]>2011-05-11 17:12:47 -0400
committerLuke Dashjr <[email protected]>2011-05-11 17:13:04 -0400
commitaa4a9c5250f94c82a9e4077a1b56ba634a9841fa (patch)
tree63db54924d30f5eaf5580d8722277437cf511267
parentUpdate nTime after nExtraNonce to avoid potential race (diff)
downloaddiscoin-aa4a9c5250f94c82a9e4077a1b56ba634a9841fa.tar.xz
discoin-aa4a9c5250f94c82a9e4077a1b56ba634a9841fa.zip
Reset extraNonce only every 15 seconds, just in case some miner is updating time himself and stuff
-rw-r--r--main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.cpp b/main.cpp
index 4c8f20c1e..bf7c99349 100644
--- a/main.cpp
+++ b/main.cpp
@@ -3448,7 +3448,7 @@ void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int&
{
// Update nExtraNonce
int64 nNow = max(pindexPrev->GetMedianTimePast()+1, GetAdjustedTime());
- if (++nExtraNonce >= 0x7f && nNow > nPrevTime+1)
+ if (++nExtraNonce >= 0x7f && nNow > nPrevTime+15)
{
nExtraNonce = 1;
nPrevTime = nNow;