diff options
| author | Luke Dashjr <[email protected]> | 2011-05-11 17:12:47 -0400 |
|---|---|---|
| committer | Luke Dashjr <[email protected]> | 2011-05-11 17:13:04 -0400 |
| commit | aa4a9c5250f94c82a9e4077a1b56ba634a9841fa (patch) | |
| tree | 63db54924d30f5eaf5580d8722277437cf511267 | |
| parent | Update nTime after nExtraNonce to avoid potential race (diff) | |
| download | discoin-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.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |