From 319b11607f8592d7ef67ec82fa73545ad7430974 Mon Sep 17 00:00:00 2001 From: Gavin Andresen Date: Tue, 27 Aug 2013 15:51:57 +1000 Subject: Refactor: CTxMempool class to its own txmempool.{cpp,h} --- src/rpcmining.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/rpcmining.cpp') 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(); -- cgit v1.2.3