mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Threading support for node deletion.
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
#include <boost/format.hpp>
|
||||
|
||||
#include "Ledger.h"
|
||||
|
||||
SerializedLedgerEntry::SerializedLedgerEntry(SerializerIterator& sit, const uint256& index)
|
||||
: SerializedType("LedgerEntry"), mIndex(index)
|
||||
{
|
||||
@@ -103,4 +105,30 @@ void SerializedLedgerEntry::thread(const uint256& txID, uint32 ledgerSeq, uint25
|
||||
setIFieldU32(sfLastTxnSeq, ledgerSeq);
|
||||
}
|
||||
|
||||
std::vector<uint256> SerializedLedgerEntry::getOwners()
|
||||
{
|
||||
std::vector<uint256> owners;
|
||||
uint160 account;
|
||||
|
||||
for (int i = 0, fields = getIFieldCount(); i < fields; ++i)
|
||||
{
|
||||
switch (getIFieldSType(i))
|
||||
{
|
||||
case sfAccount:
|
||||
case sfLowID:
|
||||
case sfHighID:
|
||||
{
|
||||
const STAccount* entry = dynamic_cast<const STAccount *>(mObject.peekAtPIndex(i));
|
||||
if ((entry != NULL) && entry->getValueH160(account))
|
||||
owners.push_back(Ledger::getAccountRootIndex(account));
|
||||
}
|
||||
|
||||
default:
|
||||
nothing();
|
||||
}
|
||||
}
|
||||
|
||||
return owners;
|
||||
}
|
||||
|
||||
// vim:ts=4
|
||||
|
||||
Reference in New Issue
Block a user