mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Move to new directory format.
This commit is contained in:
@@ -559,14 +559,17 @@ Json::Value RPCServer::doAccountLines(const Json::Value ¶ms)
|
||||
ret["account"] = naAccount.humanAccountID();
|
||||
|
||||
// We access a committed ledger and need not worry about changes.
|
||||
uint256 uDirLineNodeFirst;
|
||||
uint256 uDirLineNodeLast;
|
||||
uint256 uRootIndex;
|
||||
|
||||
if (mNetOps->getDirLineInfo(uCurrent, naAccount, uDirLineNodeFirst, uDirLineNodeLast))
|
||||
if (mNetOps->getDirLineInfo(uCurrent, naAccount, uRootIndex))
|
||||
{
|
||||
for (; uDirLineNodeFirst <= uDirLineNodeLast; uDirLineNodeFirst++)
|
||||
bool bDone = false;
|
||||
|
||||
while (!bDone)
|
||||
{
|
||||
STVector256 svRippleNodes = mNetOps->getDirNode(uCurrent, uDirLineNodeFirst);
|
||||
uint64 uNodePrevious;
|
||||
uint64 uNodeNext;
|
||||
STVector256 svRippleNodes = mNetOps->getDirNodeInfo(uCurrent, uRootIndex, uNodePrevious, uNodeNext);
|
||||
|
||||
BOOST_FOREACH(uint256& uNode, svRippleNodes.peekValue())
|
||||
{
|
||||
@@ -602,6 +605,15 @@ Json::Value RPCServer::doAccountLines(const Json::Value ¶ms)
|
||||
std::cerr << "doAccountLines: Bad index: " << uNode.ToString() << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
if (uNodeNext)
|
||||
{
|
||||
uCurrent = Ledger::getDirNodeIndex(uRootIndex, uNodeNext);
|
||||
}
|
||||
else
|
||||
{
|
||||
bDone = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
ret["lines"] = jsonLines;
|
||||
|
||||
Reference in New Issue
Block a user