Cache for immutable LES's.

This commit is contained in:
JoelKatz
2013-05-14 18:36:14 -07:00
parent 423635d2ef
commit 29d86eba55
2 changed files with 10 additions and 6 deletions

View File

@@ -56,6 +56,7 @@ protected:
TransactionMetaSet mSet;
TransactionEngineParams mParams;
int mSeq;
bool mImmutable;
LedgerEntrySet(Ledger::ref ledger, const std::map<uint256, LedgerEntrySetEntry> &e,
const TransactionMetaSet& s, int m) : mLedger(ledger), mEntries(e), mSet(s), mParams(tapNONE), mSeq(m) { ; }
@@ -72,11 +73,14 @@ protected:
public:
LedgerEntrySet(Ledger::ref ledger, TransactionEngineParams tep) : mLedger(ledger), mParams(tep), mSeq(0) { ; }
LedgerEntrySet(Ledger::ref ledger, TransactionEngineParams tep, bool immutable = false) :
mLedger(ledger), mParams(tep), mSeq(0), mImmutable(immutable) { ; }
LedgerEntrySet() : mParams(tapNONE), mSeq(0) { ; }
LedgerEntrySet() : mParams(tapNONE), mSeq(0), mImmutable(false) { ; }
// set functions
void setImmutable() { mImmutable = true; }
bool isImmutable() const { return mImmutable; }
LedgerEntrySet duplicate() const; // Make a duplicate of this set
void setTo(const LedgerEntrySet&); // Set this set to have the same contents as another
void swapWith(LedgerEntrySet&); // Swap the contents of two sets