rippled
Loading...
Searching...
No Matches
src/xrpld/rpc/detail/Tuning.h
1//------------------------------------------------------------------------------
2/*
3 This file is part of rippled: https://github.com/ripple/rippled
4 Copyright (c) 2012, 2013 Ripple Labs Inc.
5
6 Permission to use, copy, modify, and/or distribute this software for any
7 purpose with or without fee is hereby granted, provided that the above
8 copyright notice and this permission notice appear in all copies.
9
10 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17*/
18//==============================================================================
19
20#ifndef RIPPLE_RPC_TUNING_H_INCLUDED
21#define RIPPLE_RPC_TUNING_H_INCLUDED
22
23namespace ripple {
24namespace RPC {
25
28namespace Tuning {
29
32{
33 unsigned int rmin, rdefault, rmax;
34};
35
37static LimitRange constexpr accountLines = {10, 200, 400};
38
40static LimitRange constexpr accountChannels = {10, 200, 400};
41
43static LimitRange constexpr accountObjects = {10, 200, 400};
44
46static LimitRange constexpr accountOffers = {10, 200, 400};
47
49static LimitRange constexpr bookOffers = {0, 60, 100};
50
52static LimitRange constexpr noRippleCheck = {10, 300, 400};
53
55static LimitRange constexpr accountNFTokens = {20, 100, 400};
56
58static LimitRange constexpr nftOffers = {50, 250, 500};
59
60static int constexpr defaultAutoFillFeeMultiplier = 10;
61static int constexpr defaultAutoFillFeeDivisor = 1;
62static int constexpr maxPathfindsInProgress = 2;
63static int constexpr maxPathfindJobCount = 50;
64static int constexpr maxJobQueueClients = 500;
66static int constexpr maxRequestSize = 1000000;
67
69static int constexpr binaryPageLength = 2048;
70
72static int constexpr jsonPageLength = 256;
73
75inline int constexpr pageLength(bool isBinary)
76{
77 return isBinary ? binaryPageLength : jsonPageLength;
78}
79
81static int constexpr max_src_cur = 18;
82
84static int constexpr max_auto_src_cur = 88;
85
86} // namespace Tuning
89} // namespace RPC
90} // namespace ripple
91
92#endif
static int constexpr maxPathfindJobCount
static int constexpr max_src_cur
Maximum number of source currencies allowed in a path find request.
static int constexpr jsonPageLength
Maximum number of pages in one response from a Json LedgerData request.
static int constexpr maxJobQueueClients
static int constexpr maxRequestSize
static int constexpr binaryPageLength
Maximum number of pages in one response from a binary LedgerData request.
static int constexpr defaultAutoFillFeeMultiplier
static int constexpr maxPathfindsInProgress
static LimitRange constexpr accountOffers
Limits for the account_offers command.
static int constexpr max_auto_src_cur
Maximum number of auto source currencies in a path find request.
static LimitRange constexpr accountLines
Limits for the account_lines command.
static int constexpr defaultAutoFillFeeDivisor
int constexpr pageLength(bool isBinary)
Maximum number of pages in a LedgerData response.
static LimitRange constexpr bookOffers
Limits for the book_offers command.
static LimitRange constexpr accountNFTokens
Limits for the account_nftokens command, in pages.
static LimitRange constexpr nftOffers
Limits for the nft_buy_offers & nft_sell_offers commands.
static LimitRange constexpr accountChannels
Limits for the account_channels command.
static LimitRange constexpr noRippleCheck
Limits for the no_ripple_check command.
static LimitRange constexpr accountObjects
Limits for the account_objects command.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:25
Represents RPC limit parameter values that have a min, default and max.