mirror of
https://github.com/XRPLF/clio.git
synced 2025-12-06 17:27:58 +00:00
Make Clio RPCs more consistent with rippled (#110)
* parse ledger_index as number * allow websocket to use "command" or "method" * mark all non-forwarded responses as validated * dont mark forwarded errors as successful * reduce forwarding Websocket expiration 30->3 seconds * fix merge conflict in test.py * adds ledger_current and ledger_closed * deserialize `taker_gets_funded` into amount json * limit account RPCs by number of objects traversed * assign result correctly
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include <rpc/Counters.h>
|
||||
#include <rpc/RPC.h>
|
||||
|
||||
namespace RPC {
|
||||
|
||||
@@ -19,6 +20,9 @@ Counters::initializeCounter(std::string const& method)
|
||||
void
|
||||
Counters::rpcErrored(std::string const& method)
|
||||
{
|
||||
if (!validHandler(method))
|
||||
return;
|
||||
|
||||
initializeCounter(method);
|
||||
|
||||
std::shared_lock lk(mutex_);
|
||||
@@ -32,6 +36,9 @@ Counters::rpcComplete(
|
||||
std::string const& method,
|
||||
std::chrono::microseconds const& rpcDuration)
|
||||
{
|
||||
if (!validHandler(method))
|
||||
return;
|
||||
|
||||
initializeCounter(method);
|
||||
|
||||
std::shared_lock lk(mutex_);
|
||||
@@ -44,6 +51,9 @@ Counters::rpcComplete(
|
||||
void
|
||||
Counters::rpcForwarded(std::string const& method)
|
||||
{
|
||||
if (!validHandler(method))
|
||||
return;
|
||||
|
||||
initializeCounter(method);
|
||||
|
||||
std::shared_lock lk(mutex_);
|
||||
|
||||
Reference in New Issue
Block a user