|
|
@ -1330,15 +1330,15 @@ Value getwork(const Array& params, bool fHelp)
|
|
|
|
vNewBlock.push_back(pblock);
|
|
|
|
vNewBlock.push_back(pblock);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Update nTime
|
|
|
|
|
|
|
|
pblock->nTime = max(pindexPrev->GetMedianTimePast()+1, GetAdjustedTime());
|
|
|
|
|
|
|
|
pblock->nNonce = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Update nExtraNonce
|
|
|
|
// Update nExtraNonce
|
|
|
|
static unsigned int nExtraNonce = 0;
|
|
|
|
static unsigned int nExtraNonce = 0;
|
|
|
|
static int64 nPrevTime = 0;
|
|
|
|
static int64 nPrevTime = 0;
|
|
|
|
IncrementExtraNonce(pblock, pindexPrev, nExtraNonce, nPrevTime);
|
|
|
|
IncrementExtraNonce(pblock, pindexPrev, nExtraNonce, nPrevTime);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Update nTime
|
|
|
|
|
|
|
|
pblock->nTime = max(pindexPrev->GetMedianTimePast()+1, GetAdjustedTime());
|
|
|
|
|
|
|
|
pblock->nNonce = 0;
|
|
|
|
|
|
|
|
|
|
|
|
// Save
|
|
|
|
// Save
|
|
|
|
mapNewBlock[pblock->hashMerkleRoot] = make_pair(pblock, nExtraNonce);
|
|
|
|
mapNewBlock[pblock->hashMerkleRoot] = make_pair(pblock, nExtraNonce);
|
|
|
|
|
|
|
|
|
|
|
|