rippled
Loading...
Searching...
No Matches
SystemParameters.h
1#ifndef XRPL_PROTOCOL_SYSTEMPARAMETERS_H_INCLUDED
2#define XRPL_PROTOCOL_SYSTEMPARAMETERS_H_INCLUDED
3
4#include <xrpl/basics/chrono.h>
5#include <xrpl/protocol/XRPAmount.h>
6
7#include <cstdint>
8#include <string>
9
10namespace ripple {
11
12// Various protocol and system specific constant globals.
13
14/* The name of the system. */
15static inline std::string const&
17{
18 static std::string const name = "ripple";
19 return name;
20}
21
25constexpr XRPAmount INITIAL_XRP{100'000'000'000 * DROPS_PER_XRP};
26
28inline bool
30{
31 return amount <= INITIAL_XRP;
32}
33
36inline bool
38{
39 return amount >= -INITIAL_XRP && amount <= INITIAL_XRP;
40}
41
42/* The currency code for the native currency. */
43static inline std::string const&
45{
46 static std::string const code = "XRP";
47 return code;
48}
49
51static constexpr std::uint32_t XRP_LEDGER_EARLIEST_SEQ{32570u};
52
55static constexpr std::uint32_t XRP_LEDGER_EARLIEST_FEES{562177u};
56
59
62
63} // namespace ripple
64
66inline std::uint16_t constexpr DEFAULT_PEER_PORT{2459};
67
68#endif
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6
static std::string const & systemName()
constexpr std::chrono::seconds const defaultAmendmentMajorityTime
The minimum amount of time an amendment must hold a majority.
bool isLegalAmount(XRPAmount const &amount)
Returns true if the amount does not exceed the initial XRP in existence.
static constexpr std::uint32_t XRP_LEDGER_EARLIEST_SEQ
The XRP ledger network's earliest allowed sequence.
static std::string const & systemCurrencyCode()
bool isLegalAmountSigned(XRPAmount const &amount)
Returns true if the absolute value of the amount does not exceed the initial XRP in existence.
constexpr XRPAmount INITIAL_XRP
Configure the native currency.
static constexpr std::uint32_t XRP_LEDGER_EARLIEST_FEES
The XRP Ledger mainnet's earliest ledger with a FeeSettings object.
constexpr std::ratio< 80, 100 > amendmentMajorityCalcThreshold
The minimum amount of support an amendment should have.
constexpr XRPAmount DROPS_PER_XRP
Number of drops per 1 XRP.
Definition XRPAmount.h:240