20#include <xrpld/rpc/Context.h> 
   21#include <xrpld/rpc/handlers/Handlers.h> 
   23#include <xrpl/json/json_value.h> 
   24#include <xrpl/protocol/ErrorCodes.h> 
   25#include <xrpl/protocol/PublicKey.h> 
   26#include <xrpl/protocol/RPCErr.h> 
   27#include <xrpl/protocol/jss.h> 
   38    auto const& params = context.
params;
 
   40    if (!params.isMember(jss::public_key))
 
   56    if (!params[jss::public_key].isString())
 
   62    if (params.isMember(jss::description))
 
   64        if (!params[jss::description].isString())
 
   66        desc = params[jss::description].asString();
 
   83        result[jss::previous] = previous->toJson();
 
 
   91    auto const& params = context.
params;
 
   94    if (!params.isMember(jss::public_key))
 
   96    if (!params[jss::public_key].isString())
 
  110        result[jss::previous] = previous->toJson();
 
 
  123    for (
auto const& reservation : reservations)
 
  125        jaReservations.
append(reservation.toJson());
 
 
Value & append(Value const &value)
Append value to array at the end.
 
virtual PeerReservationTable & peerReservations()=0
 
std::optional< PeerReservation > insert_or_assign(PeerReservation const &reservation)
 
std::vector< PeerReservation > list() const
 
std::optional< PeerReservation > erase(PublicKey const &nodeId)
 
@ arrayValue
array value (ordered list)
 
@ objectValue
object value (collection of name/value pairs).
 
Json::Value expected_field_error(std::string const &name, std::string const &type)
 
Json::Value missing_field_error(std::string const &name)
 
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
 
Json::Value doPeerReservationsAdd(RPC::JsonContext &)
 
Json::Value doPeerReservationsList(RPC::JsonContext &)
 
Json::Value rpcError(int iError)
 
Json::Value doPeerReservationsDel(RPC::JsonContext &)