Beging merging transaction metadata code with ledger entry set code.

This commit is contained in:
JoelKatz
2012-07-27 12:56:28 -07:00
parent ad77087ee5
commit ce2e1cea33
5 changed files with 42 additions and 6 deletions

View File

@@ -2,20 +2,35 @@
#include <boost/make_shared.hpp>
void LedgerEntrySet::init(const uint256& transactionID, uint32 ledgerID)
{
mEntries.clear();
mSet.init(transactionID, ledgerID);
mSeq = 0;
}
void LedgerEntrySet::clear()
{
mEntries.clear();
mSet.clear();
}
LedgerEntrySet LedgerEntrySet::duplicate()
{
return LedgerEntrySet(mEntries, mSeq + 1);
return LedgerEntrySet(mEntries, mSet, mSeq + 1);
}
void LedgerEntrySet::setTo(LedgerEntrySet& e)
{
mEntries = e.mEntries;
mSet = e.mSet;
mSeq = e.mSeq;
}
void LedgerEntrySet::swapWith(LedgerEntrySet& e)
{
std::swap(mSeq, e.mSeq);
mSet.swap(e.mSet);
mEntries.swap(e.mEntries);
}