mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Fix thread. New constructor.
This commit is contained in:
@@ -95,10 +95,9 @@ int TMNEAmount::compare(const TransactionMetaNodeEntry& e) const
|
||||
return 0;
|
||||
}
|
||||
|
||||
TMNEAccount::TMNEAccount(int type, SerializerIterator& sit) : TransactionMetaNodeEntry(type)
|
||||
{
|
||||
mPrevAccount = sit.get256();
|
||||
}
|
||||
TMNEAccount::TMNEAccount(int type, SerializerIterator& sit)
|
||||
: TransactionMetaNodeEntry(type), mPrevAccount(sit.get256())
|
||||
{ ; }
|
||||
|
||||
void TMNEAccount::addRaw(Serializer& sit) const
|
||||
{
|
||||
@@ -184,9 +183,14 @@ void TransactionMetaNode::addNode(TransactionMetaNodeEntry* node)
|
||||
mEntries.push_back(node);
|
||||
}
|
||||
|
||||
void TransactionMetaNode::thread(const uint256& prevTx, uint32 prevLgr)
|
||||
bool TransactionMetaNode::thread(const uint256& prevTx, uint32 prevLgr)
|
||||
{
|
||||
// WRITEME
|
||||
for (boost::ptr_vector<TransactionMetaNodeEntry>::iterator it = mEntries.begin(), end = mEntries.end();
|
||||
it != end; ++it)
|
||||
if (it->getType() == TMSThread)
|
||||
return false;
|
||||
addNode(new TMNEThread(prevTx, prevLgr));
|
||||
return true;
|
||||
}
|
||||
|
||||
Json::Value TransactionMetaNode::getJson(int v) const
|
||||
|
||||
@@ -69,6 +69,9 @@ protected:
|
||||
|
||||
public:
|
||||
TMNEThread() : TransactionMetaNodeEntry(TMSThread) { ; }
|
||||
TMNEThread(uint256 prevTx, uint32 prevLgrSeq)
|
||||
: TransactionMetaNodeEntry(TMSThread), mPrevTxID(prevTx), mPrevLgrSeq(prevLgrSeq)
|
||||
{ ; }
|
||||
TMNEThread(SerializerIterator&);
|
||||
|
||||
virtual void addRaw(Serializer&) const;
|
||||
@@ -143,7 +146,7 @@ public:
|
||||
bool operator>(const TransactionMetaNode& n) const { return mNode > n.mNode; }
|
||||
bool operator>=(const TransactionMetaNode& n) const { return mNode >= n.mNode; }
|
||||
|
||||
void thread(const uint256& prevTx, uint32 prevLgr);
|
||||
bool thread(const uint256& prevTx, uint32 prevLgr);
|
||||
|
||||
TransactionMetaNode(int type, const uint256& node, SerializerIterator&);
|
||||
void addRaw(Serializer&);
|
||||
|
||||
Reference in New Issue
Block a user