Refactor: CTxMempool class to its own txmempool.{cpp,h}

This commit is contained in:
Gavin Andresen
2013-08-27 15:51:57 +10:00
parent 39b4f0d7dd
commit 319b11607f
11 changed files with 319 additions and 248 deletions

View File

@@ -521,7 +521,7 @@ void static BitcoinMiner(CWallet *pwallet)
//
// Create new block
//
unsigned int nTransactionsUpdatedLast = nTransactionsUpdated;
unsigned int nTransactionsUpdatedLast = mempool.GetTransactionsUpdated();
CBlockIndex* pindexPrev = chainActive.Tip();
auto_ptr<CBlockTemplate> pblocktemplate(CreateNewBlockWithKey(reservekey));
@@ -623,7 +623,7 @@ void static BitcoinMiner(CWallet *pwallet)
break;
if (nBlockNonce >= 0xffff0000)
break;
if (nTransactionsUpdated != nTransactionsUpdatedLast && GetTime() - nStart > 60)
if (mempool.GetTransactionsUpdated() != nTransactionsUpdatedLast && GetTime() - nStart > 60)
break;
if (pindexPrev != chainActive.Tip())
break;