mirror of
https://github.com/XRPLF/clio.git
synced 2025-12-03 01:55:54 +00:00
Return actNotFound for non-existent account in traverseOwnedNodes (#382)
This commit is contained in:
@@ -663,6 +663,10 @@ traverseOwnedNodes(
|
||||
boost::asio::yield_context& yield,
|
||||
std::function<void(ripple::SLE&&)> atOwnedNode)
|
||||
{
|
||||
if (!backend.fetchLedgerObject(
|
||||
ripple::keylet::account(accountID).key, sequence, yield))
|
||||
return Status{Error::rpcACT_NOT_FOUND};
|
||||
|
||||
auto parsedCursor =
|
||||
parseAccountCursor(backend, sequence, jsonCursor, accountID, yield);
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ doGatewayBalances(Context const& context)
|
||||
return true;
|
||||
};
|
||||
|
||||
traverseOwnedNodes(
|
||||
auto result = traverseOwnedNodes(
|
||||
*context.backend,
|
||||
accountID,
|
||||
lgrInfo.seq,
|
||||
@@ -146,6 +146,8 @@ doGatewayBalances(Context const& context)
|
||||
{},
|
||||
context.yield,
|
||||
addToResponse);
|
||||
if (auto status = std::get_if<RPC::Status>(&result))
|
||||
return *status;
|
||||
|
||||
if (!sums.empty())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user