Changes to support threading through account roots, offers, and ripple state nodes.

Fix tracking the last transaction signed by an account.
This commit is contained in:
JoelKatz
2012-08-20 13:45:58 -07:00
parent a99f814c20
commit 68b044ddde
6 changed files with 17 additions and 5 deletions

View File

@@ -96,13 +96,17 @@ uint32 SerializedLedgerEntry::getThreadedLedger()
return getIFieldU32(sfLastTxnSeq);
}
void SerializedLedgerEntry::thread(const uint256& txID, uint32 ledgerSeq, uint256& prevTxID, uint32& prevLedgerID)
bool SerializedLedgerEntry::thread(const uint256& txID, uint32 ledgerSeq, uint256& prevTxID, uint32& prevLedgerID)
{
prevTxID = getIFieldH256(sfLastTxnID);
uint256 oldPrevTxID = getIFieldH256(sfLastTxnID);
if (oldPrevTxID == txID)
return false;
prevTxID = oldPrevTxID;
prevLedgerID = getIFieldU32(sfLastTxnID);
assert(prevTxID != txID);
setIFieldH256(sfLastTxnID, txID);
setIFieldU32(sfLastTxnSeq, ledgerSeq);
return true;
}
std::vector<uint256> SerializedLedgerEntry::getOwners()