mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-30 08:35:52 +00:00
@@ -121,7 +121,7 @@ public:
|
||||
verify(boost::json::value const& value, std::string_view key)
|
||||
{
|
||||
if (value.is_object() and value.as_object().contains(key.data()))
|
||||
return Error{Status{RippledError::rpcNOT_SUPPORTED, "Not supported field '" + std::string{key}}};
|
||||
return Error{Status{RippledError::rpcNOT_SUPPORTED, "Not supported field '" + std::string{key} + '\''}};
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
@@ -75,11 +75,8 @@ public:
|
||||
};
|
||||
|
||||
auto const checkLedgerForward = [&]() {
|
||||
return ctx.method == "ledger" and
|
||||
((request.contains("queue") and request.at("queue").is_bool() and request.at("queue").as_bool()) or
|
||||
(request.contains("full") and request.at("full").is_bool() and request.at("full").as_bool()) or
|
||||
(request.contains("accounts") and request.at("accounts").is_bool() and request.at("accounts").as_bool()
|
||||
));
|
||||
return ctx.method == "ledger" and request.contains("queue") and request.at("queue").is_bool() and
|
||||
request.at("queue").as_bool();
|
||||
};
|
||||
|
||||
return static_cast<bool>(checkAccountInfoForward() or checkLedgerForward());
|
||||
|
||||
@@ -62,13 +62,16 @@ public:
|
||||
* @brief A struct to hold the input data for the command
|
||||
*
|
||||
* Clio does not support:
|
||||
* - accounts
|
||||
* - full
|
||||
* - owner_finds
|
||||
* - queue
|
||||
*
|
||||
* And the following are deprecated altogether:
|
||||
* - full
|
||||
* - accounts
|
||||
* - ledger
|
||||
* - type
|
||||
*
|
||||
* Clio will throw an error when any of `accounts`/`full`/`owner_funds`/`queue` are set to `true`
|
||||
* Clio will throw an error when `queue` is set to `true`
|
||||
* or if `full` or `accounts` are used.
|
||||
* @see https://github.com/XRPLF/clio/issues/603
|
||||
*/
|
||||
struct Input {
|
||||
@@ -102,9 +105,9 @@ public:
|
||||
spec([[maybe_unused]] uint32_t apiVersion)
|
||||
{
|
||||
static auto const rpcSpec = RpcSpec{
|
||||
{JS(full), validation::Type<bool>{}, validation::NotSupported{true}},
|
||||
{JS(full), validation::NotSupported{}},
|
||||
{JS(full), check::Deprecated{}},
|
||||
{JS(accounts), validation::Type<bool>{}, validation::NotSupported{true}},
|
||||
{JS(accounts), validation::NotSupported{}},
|
||||
{JS(accounts), check::Deprecated{}},
|
||||
{JS(owner_funds), validation::Type<bool>{}},
|
||||
{JS(queue), validation::Type<bool>{}, validation::NotSupported{true}},
|
||||
|
||||
Reference in New Issue
Block a user