aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoinrpc.cpp
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2012-02-16 10:22:31 -0500
committerGavin Andresen <gavinandresen@gmail.com>2012-02-16 11:37:54 -0500
commit0f8cb5db73e8ab06b779b3cf82e26986ccc7c3f8 (patch)
tree7313dd40525ceaf1908db04397ee21bb0804c56d /src/bitcoinrpc.cpp
parentb7c25e0c1346256be12310264ea5cc4ce7794118 (diff)
Fix issue #848 : broken mining on testnet
Diffstat (limited to 'src/bitcoinrpc.cpp')
-rw-r--r--src/bitcoinrpc.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp
index cf5bc64bb9..25a787a7a0 100644
--- a/src/bitcoinrpc.cpp
+++ b/src/bitcoinrpc.cpp
@@ -1816,7 +1816,7 @@ Value getwork(const Array& params, bool fHelp)
}
// Update nTime
- pblock->nTime = max(pindexPrev->GetMedianTimePast()+1, GetAdjustedTime());
+ pblock->UpdateTime(pindexPrev);
pblock->nNonce = 0;
// Update nExtraNonce
@@ -1916,7 +1916,7 @@ Value getmemorypool(const Array& params, bool fHelp)
}
// Update nTime
- pblock->nTime = max(pindexPrev->GetMedianTimePast()+1, GetAdjustedTime());
+ pblock->UpdateTime(pindexPrev);
pblock->nNonce = 0;
Array transactions;