Use the transaction master.

This commit is contained in:
JoelKatz
2012-01-27 11:34:41 -08:00
parent 4f0a9a4ce5
commit 110a4a47f1
3 changed files with 28 additions and 5 deletions

24
TransactionMaster.h Normal file
View File

@@ -0,0 +1,24 @@
#ifndef __TRANSACTIONMASTER__
#define __TRANSACTIONMASTER__
#include "Transaction.h"
#include "TaggedCache.h"
// Tracks all transactions in memory
class TransactionMaster
{
protected:
TaggedCache<uint256, Transaction> mCache;
public:
TransactionMaster();
Transaction::pointer fetch(const uint256&, bool checkDisk);
// return value: true = we had the transaction already
bool canonicalize(Transaction::pointer& txn, bool maybeNew);
};
#endif