aboutsummaryrefslogtreecommitdiff
path: root/src/rpc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpc.cpp')
-rw-r--r--src/rpc.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/rpc.cpp b/src/rpc.cpp
index 2a458423ce..33cfa77b40 100644
--- a/src/rpc.cpp
+++ b/src/rpc.cpp
@@ -1615,15 +1615,14 @@ Value getwork(const Array& params, bool fHelp)
vNewBlock.push_back(pblock);
}
- // Update nExtraNonce
- static unsigned int nExtraNonce = 0;
- static int64 nPrevTime = 0;
- IncrementExtraNonce(pblock, pindexPrev, nExtraNonce, nPrevTime);
-
// Update nTime
pblock->nTime = max(pindexPrev->GetMedianTimePast()+1, GetAdjustedTime());
pblock->nNonce = 0;
+ // Update nExtraNonce
+ static unsigned int nExtraNonce = 0;
+ IncrementExtraNonce(pblock, pindexPrev, nExtraNonce);
+
// Save
mapNewBlock[pblock->hashMerkleRoot] = make_pair(pblock, pblock->vtx[0].vin[0].scriptSig);