mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Set up for ledger diffs to populate the metadata.
Special case for unfunded offers -- need to know how much was taken before deletion
This commit is contained in:
@@ -147,7 +147,7 @@ void LedgerEntrySet::entryModify(SLE::pointer& sle)
|
||||
}
|
||||
}
|
||||
|
||||
void LedgerEntrySet::entryDelete(SLE::pointer& sle)
|
||||
void LedgerEntrySet::entryDelete(SLE::pointer& sle, bool unfunded)
|
||||
{
|
||||
boost::unordered_map<uint256, LedgerEntrySetEntry>::iterator it = mEntries.find(sle->getIndex());
|
||||
if (it == mEntries.end())
|
||||
@@ -166,6 +166,13 @@ void LedgerEntrySet::entryDelete(SLE::pointer& sle)
|
||||
it->second.mSeq = mSeq;
|
||||
it->second.mEntry = sle;
|
||||
it->second.mAction = taaDELETE;
|
||||
if (unfunded)
|
||||
{
|
||||
assert(sle->getType() == ltOFFER); // only offers can be unfunded
|
||||
mSet.deleteUnfunded(sle->getIndex(),
|
||||
sle->getIValueFieldAmount(sfTakerPays),
|
||||
sle->getIValueFieldAmount(sfTakerGets));
|
||||
}
|
||||
break;
|
||||
|
||||
case taaCREATE:
|
||||
|
||||
Reference in New Issue
Block a user