aboutsummaryrefslogtreecommitdiff
path: root/src/rpcmining.cpp
diff options
context:
space:
mode:
authorGavin Andresen <[email protected]>2013-11-03 20:07:36 -0800
committerGavin Andresen <[email protected]>2013-11-03 20:07:36 -0800
commita95a1c06b1823d13e8b685c6b18696ead1d17422 (patch)
tree35a62a9d0df1c0bb9157e8cc85ab086c01c55217 /src/rpcmining.cpp
parentMerge pull request #3193 from joshtriplett/patch-1 (diff)
parentRefactor: CTxMempool class to its own txmempool.{cpp,h} (diff)
downloaddiscoin-a95a1c06b1823d13e8b685c6b18696ead1d17422.tar.xz
discoin-a95a1c06b1823d13e8b685c6b18696ead1d17422.zip
Merge pull request #3154 from gavinandresen/mempool_refactor
Mempool refactor
Diffstat (limited to 'src/rpcmining.cpp')
-rw-r--r--src/rpcmining.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 77dc13815..d91f26e20 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -190,7 +190,7 @@ Value getwork(const Array& params, bool fHelp)
static int64 nStart;
static CBlockTemplate* pblocktemplate;
if (pindexPrev != chainActive.Tip() ||
- (nTransactionsUpdated != nTransactionsUpdatedLast && GetTime() - nStart > 60))
+ (mempool.GetTransactionsUpdated() != nTransactionsUpdatedLast && GetTime() - nStart > 60))
{
if (pindexPrev != chainActive.Tip())
{
@@ -205,7 +205,7 @@ Value getwork(const Array& params, bool fHelp)
pindexPrev = NULL;
// Store the pindexBest used before CreateNewBlock, to avoid races
- nTransactionsUpdatedLast = nTransactionsUpdated;
+ nTransactionsUpdatedLast = mempool.GetTransactionsUpdated();
CBlockIndex* pindexPrevNew = chainActive.Tip();
nStart = GetTime();
@@ -326,13 +326,13 @@ Value getblocktemplate(const Array& params, bool fHelp)
static int64 nStart;
static CBlockTemplate* pblocktemplate;
if (pindexPrev != chainActive.Tip() ||
- (nTransactionsUpdated != nTransactionsUpdatedLast && GetTime() - nStart > 5))
+ (mempool.GetTransactionsUpdated() != nTransactionsUpdatedLast && GetTime() - nStart > 5))
{
// Clear pindexPrev so future calls make a new block, despite any failures from here on
pindexPrev = NULL;
// Store the pindexBest used before CreateNewBlock, to avoid races
- nTransactionsUpdatedLast = nTransactionsUpdated;
+ nTransactionsUpdatedLast = mempool.GetTransactionsUpdated();
CBlockIndex* pindexPrevNew = chainActive.Tip();
nStart = GetTime();