specify [min, default, max] limits in handler table (#135)

* specify rpc limits in the handler table
* special case in ledger_data if !binary
This commit is contained in:
Nathan Nichols
2022-06-15 16:51:49 -05:00
committed by GitHub
parent fa8405df83
commit 92d6687151
13 changed files with 135 additions and 81 deletions

View File

@@ -70,8 +70,8 @@ doAccountChannels(Context const& context)
status)
return status;
std::uint32_t limit = 200;
if (auto const status = getLimit(request, limit); status)
std::uint32_t limit;
if (auto const status = getLimit(context, limit); status)
return status;
std::optional<std::string> marker = {};
@@ -93,11 +93,6 @@ doAccountChannels(Context const& context)
(!destAccount ||
destAccount == sle.getAccountID(ripple::sfDestination)))
{
if (limit-- == 0)
{
return false;
}
addChannel(jsonChannels, sle);
}