mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Some cleanups.
This commit is contained in:
@@ -328,8 +328,8 @@ bool LedgerEntrySet::threadTx(SLE::ref threadTo, Ledger::ref ledger,
|
||||
if (!threadTo->thread(mSet.getTxID(), mSet.getLgrSeq(), prevTxID, prevLgrID))
|
||||
return false;
|
||||
|
||||
if (prevTxID.isZero() || TransactionMetaSet::thread(mSet.getAffectedNode(threadTo->getIndex(), sfModifiedNode),
|
||||
prevTxID, prevLgrID))
|
||||
if (prevTxID.isZero() ||
|
||||
TransactionMetaSet::thread(mSet.getAffectedNode(threadTo, sfModifiedNode), prevTxID, prevLgrID))
|
||||
return true;
|
||||
|
||||
assert(false);
|
||||
@@ -408,8 +408,7 @@ void LedgerEntrySet::calcRawMeta(Serializer& s, TER result)
|
||||
|
||||
if (type == &sfDeletedNode)
|
||||
{
|
||||
assert(origNode);
|
||||
assert(curNode);
|
||||
assert(origNode && curNode);
|
||||
threadOwners(origNode, mLedger, newMod); // thread transaction to owners
|
||||
|
||||
STObject prevs(sfPreviousFields);
|
||||
@@ -432,6 +431,7 @@ void LedgerEntrySet::calcRawMeta(Serializer& s, TER result)
|
||||
}
|
||||
else if (type == &sfModifiedNode)
|
||||
{
|
||||
assert(curNode && origNode);
|
||||
if (curNode->isThreadedType()) // thread transaction to node it modified
|
||||
threadTx(curNode, mLedger, newMod);
|
||||
|
||||
@@ -455,7 +455,7 @@ void LedgerEntrySet::calcRawMeta(Serializer& s, TER result)
|
||||
}
|
||||
else if (type == &sfCreatedNode) // if created, thread to owner(s)
|
||||
{
|
||||
assert(!origNode);
|
||||
assert(curNode && !origNode);
|
||||
threadOwners(curNode, mLedger, newMod);
|
||||
|
||||
if (curNode->isThreadedType()) // always thread to self
|
||||
@@ -470,6 +470,7 @@ void LedgerEntrySet::calcRawMeta(Serializer& s, TER result)
|
||||
if (!news.empty())
|
||||
mSet.getAffectedNode(it.first).addObject(news);
|
||||
}
|
||||
else assert(false);
|
||||
}
|
||||
|
||||
// add any new modified nodes to the modification set
|
||||
|
||||
Reference in New Issue
Block a user