mirror of
https://github.com/XRPLF/clio.git
synced 2025-12-06 17:27:58 +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,
|
boost::asio::yield_context& yield,
|
||||||
std::function<void(ripple::SLE&&)> atOwnedNode)
|
std::function<void(ripple::SLE&&)> atOwnedNode)
|
||||||
{
|
{
|
||||||
|
if (!backend.fetchLedgerObject(
|
||||||
|
ripple::keylet::account(accountID).key, sequence, yield))
|
||||||
|
return Status{Error::rpcACT_NOT_FOUND};
|
||||||
|
|
||||||
auto parsedCursor =
|
auto parsedCursor =
|
||||||
parseAccountCursor(backend, sequence, jsonCursor, accountID, yield);
|
parseAccountCursor(backend, sequence, jsonCursor, accountID, yield);
|
||||||
|
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ doGatewayBalances(Context const& context)
|
|||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
traverseOwnedNodes(
|
auto result = traverseOwnedNodes(
|
||||||
*context.backend,
|
*context.backend,
|
||||||
accountID,
|
accountID,
|
||||||
lgrInfo.seq,
|
lgrInfo.seq,
|
||||||
@@ -146,6 +146,8 @@ doGatewayBalances(Context const& context)
|
|||||||
{},
|
{},
|
||||||
context.yield,
|
context.yield,
|
||||||
addToResponse);
|
addToResponse);
|
||||||
|
if (auto status = std::get_if<RPC::Status>(&result))
|
||||||
|
return *status;
|
||||||
|
|
||||||
if (!sums.empty())
|
if (!sums.empty())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user