Add LES::hasChanges which returns true if an LES changes anything.

This commit is contained in:
JoelKatz
2013-03-26 20:29:13 -07:00
parent 523e009f7f
commit 79b047b68d
2 changed files with 9 additions and 0 deletions

View File

@@ -230,6 +230,14 @@ void LedgerEntrySet::entryDelete(SLE::ref sle)
}
}
bool LedgerEntrySet::hasChanges()
{
BOOST_FOREACH(u256_LES_pair&, mEntries)
if (it.second.mAction != taaCACHED)
return true;
return false;
}
bool LedgerEntrySet::intersect(const LedgerEntrySet& lesLeft, const LedgerEntrySet& lesRight)
{
return true; // XXX Needs implementation

View File

@@ -95,6 +95,7 @@ public:
void entryCreate(SLE::ref); // This entry will be created
void entryDelete(SLE::ref); // This entry will be deleted
void entryModify(SLE::ref); // This entry will be modified
bool hasChanges(); // True if LES has any changes
// higher-level ledger functions
SLE::pointer entryCreate(LedgerEntryType letType, const uint256& uIndex);