xrpld
Loading...
Searching...
No Matches
src/xrpld/rpc/detail/Tuning.h
1#pragma once
2
3#include <chrono>
4
10
15{
16 unsigned int rmin, rDefault, rmax;
17};
18
22static constexpr LimitRange kAccountLines = {.rmin = 10, .rDefault = 200, .rmax = 400};
23
27static constexpr LimitRange kAccountChannels = {.rmin = 10, .rDefault = 200, .rmax = 400};
28
32static constexpr LimitRange kAccountObjects = {.rmin = 10, .rDefault = 200, .rmax = 400};
33
37static constexpr LimitRange kAccountOffers = {.rmin = 10, .rDefault = 200, .rmax = 400};
38
42static constexpr LimitRange kAccountTx = {.rmin = 10, .rDefault = 200, .rmax = 400};
43
47static constexpr LimitRange kBookOffers = {.rmin = 1, .rDefault = 60, .rmax = 100};
48
52static constexpr LimitRange kNoRippleCheck = {.rmin = 10, .rDefault = 300, .rmax = 400};
53
57static constexpr LimitRange kAccountNfTokens = {.rmin = 20, .rDefault = 100, .rmax = 400};
58
62static constexpr LimitRange kNftOffers = {.rmin = 50, .rDefault = 250, .rmax = 500};
63
64static constexpr int kDefaultAutoFillFeeMultiplier = 10;
65static constexpr int kDefaultAutoFillFeeDivisor = 1;
66static constexpr int kMaxPathfindsInProgress = 2;
67static constexpr int kMaxPathfindJobCount = 50;
68static constexpr int kMaxJobQueueClients = 500;
70static constexpr int kMaxRequestSize = 1000000;
71
75static constexpr int kBinaryPageLength = 2048;
76
80static constexpr int kJsonPageLength = 256;
81
85constexpr int
86pageLength(bool isBinary)
87{
88 return isBinary ? kBinaryPageLength : kJsonPageLength;
89}
90
94static constexpr int kMaxSrcCur = 18;
95
99static constexpr int kMaxAutoSrcCur = 88;
100
101} // namespace xrpl::rpc::tuning
102
static constexpr int kBinaryPageLength
Maximum number of pages in one response from a binary LedgerData request.
static constexpr LimitRange kAccountTx
Limits for the account_tx command.
static constexpr LimitRange kNftOffers
Limits for the nft_buy_offers & nft_sell_offers commands.
static constexpr int kDefaultAutoFillFeeMultiplier
static constexpr int kMaxPathfindsInProgress
static constexpr int kMaxRequestSize
static constexpr int kMaxPathfindJobCount
constexpr int pageLength(bool isBinary)
Maximum number of pages in a LedgerData response.
static constexpr LimitRange kNoRippleCheck
Limits for the no_ripple_check command.
static constexpr int kDefaultAutoFillFeeDivisor
static constexpr LimitRange kAccountNfTokens
Limits for the account_nftokens command, in pages.
static constexpr LimitRange kAccountObjects
Limits for the account_objects command.
static constexpr LimitRange kBookOffers
Limits for the book_offers command.
static constexpr LimitRange kAccountLines
Limits for the account_lines command.
static constexpr LimitRange kAccountOffers
Limits for the account_offers command.
static constexpr int kMaxSrcCur
Maximum number of source currencies allowed in a path find request.
static constexpr int kMaxAutoSrcCur
Maximum number of auto source currencies in a path find request.
static constexpr LimitRange kAccountChannels
Limits for the account_channels command.
static constexpr int kMaxJobQueueClients
static constexpr int kJsonPageLength
Maximum number of pages in one response from a Json LedgerData request.
Represents RPC limit parameter values that have a min, default and max.