mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Finalizing of metadata building.
This commit is contained in:
@@ -230,26 +230,36 @@ Json::Value LedgerEntrySet::getJson(int) const
|
||||
return ret;
|
||||
}
|
||||
|
||||
void LedgerEntrySet::addRawMeta(Serializer& s)
|
||||
void LedgerEntrySet::addRawMeta(Serializer& s, Ledger::pointer origLedger)
|
||||
{
|
||||
for (boost::unordered_map<uint256, LedgerEntrySetEntry>::const_iterator it = mEntries.begin(),
|
||||
end = mEntries.end(); it != end; ++it)
|
||||
{
|
||||
int nType = TMNEndOfMetadata;
|
||||
|
||||
switch (it->second.mAction)
|
||||
{
|
||||
case taaMODIFY:
|
||||
// WRITEME
|
||||
nType = TMNModifiedNode;
|
||||
break;
|
||||
case taaDELETE:
|
||||
// WRITEME
|
||||
nType = TMNDeletedNode;
|
||||
break;
|
||||
case taaCREATE:
|
||||
// WRITEME
|
||||
nType = TMNCreatedNode;
|
||||
break;
|
||||
default:
|
||||
// ignore these
|
||||
break;
|
||||
}
|
||||
if (nType != TMNEndOfMetadata)
|
||||
{
|
||||
SLE::pointer origNode = origLedger->getSLE(it->first);
|
||||
SLE::pointer curNode = it->second.mEntry;
|
||||
|
||||
// FINISH
|
||||
|
||||
}
|
||||
}
|
||||
mSet.addRaw(s);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#include "SerializedLedger.h"
|
||||
#include "TransactionMeta.h"
|
||||
#include "Ledger.h"
|
||||
|
||||
enum LedgerEntryAction
|
||||
{
|
||||
@@ -42,7 +43,7 @@ public:
|
||||
|
||||
// set functions
|
||||
LedgerEntrySet duplicate() const; // Make a duplicate of this set
|
||||
void setTo(const LedgerEntrySet&); // Set this set to have the same contents as another
|
||||
void setTo(const LedgerEntrySet&); // Set this set to have the same contents as another
|
||||
void swapWith(LedgerEntrySet&); // Swap the contents of two sets
|
||||
|
||||
int getSeq() const { return mSeq; }
|
||||
@@ -59,7 +60,7 @@ public:
|
||||
void entryModify(const SLE::pointer&); // This entry will be modified
|
||||
|
||||
Json::Value getJson(int) const;
|
||||
void addRawMeta(Serializer&);
|
||||
void addRawMeta(Serializer&, Ledger::pointer originalLedger);
|
||||
|
||||
// iterator functions
|
||||
bool isEmpty() const { return mEntries.empty(); }
|
||||
|
||||
@@ -175,7 +175,7 @@ public:
|
||||
void swap(TransactionMetaSet&);
|
||||
|
||||
bool isNodeAffected(const uint256&) const;
|
||||
TransactionMetaNode& getAffectedNode(const uint256&);
|
||||
TransactionMetaNode& getAffectedNode(const uint256&, int type);
|
||||
const TransactionMetaNode& peekAffectedNode(const uint256&) const;
|
||||
|
||||
Json::Value getJson(int) const;
|
||||
|
||||
Reference in New Issue
Block a user