mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-27 15:15:52 +00:00
@@ -680,6 +680,8 @@ traverseOwnedNodes(
|
||||
|
||||
auto const rootIndex = owner;
|
||||
auto currentIndex = rootIndex;
|
||||
// track the current page we are accessing, will return it as the next hint
|
||||
auto currentPage = startHint;
|
||||
|
||||
std::vector<ripple::uint256> keys;
|
||||
// Only reserve 2048 nodes when fetching all owned ledger objects. If there
|
||||
@@ -742,18 +744,18 @@ traverseOwnedNodes(
|
||||
}
|
||||
}
|
||||
|
||||
auto const uNodeNext = sle.getFieldU64(ripple::sfIndexNext);
|
||||
|
||||
if (limit == 0)
|
||||
{
|
||||
cursor = AccountCursor({keys.back(), uNodeNext});
|
||||
cursor = AccountCursor({keys.back(), currentPage});
|
||||
break;
|
||||
}
|
||||
|
||||
// the next page
|
||||
auto const uNodeNext = sle.getFieldU64(ripple::sfIndexNext);
|
||||
if (uNodeNext == 0)
|
||||
break;
|
||||
|
||||
currentIndex = ripple::keylet::page(rootIndex, uNodeNext);
|
||||
currentPage = uNodeNext;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -777,18 +779,18 @@ traverseOwnedNodes(
|
||||
break;
|
||||
}
|
||||
|
||||
auto const uNodeNext = sle.getFieldU64(ripple::sfIndexNext);
|
||||
|
||||
if (limit == 0)
|
||||
{
|
||||
cursor = AccountCursor({keys.back(), uNodeNext});
|
||||
cursor = AccountCursor({keys.back(), currentPage});
|
||||
break;
|
||||
}
|
||||
|
||||
auto const uNodeNext = sle.getFieldU64(ripple::sfIndexNext);
|
||||
if (uNodeNext == 0)
|
||||
break;
|
||||
|
||||
currentIndex = ripple::keylet::page(rootIndex, uNodeNext);
|
||||
currentPage = uNodeNext;
|
||||
}
|
||||
}
|
||||
auto end = std::chrono::system_clock::now();
|
||||
|
||||
Reference in New Issue
Block a user