mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Use the transaction master.
This commit is contained in:
24
TransactionMaster.h
Normal file
24
TransactionMaster.h
Normal 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
|
||||
Reference in New Issue
Block a user