rippled
ripple
protocol
SystemParameters.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_PROTOCOL_SYSTEMPARAMETERS_H_INCLUDED
21
#define RIPPLE_PROTOCOL_SYSTEMPARAMETERS_H_INCLUDED
22
23
#include <ripple/basics/XRPAmount.h>
24
#include <
cstdint
>
25
#include <
string
>
26
27
namespace
ripple
{
28
29
// Various protocol and system specific constant globals.
30
31
/* The name of the system. */
32
static
inline
33
std::string
const
&
34
systemName
()
35
{
36
static
std::string
const
name =
"ripple"
;
37
return
name;
38
}
39
43
constexpr
44
XRPAmount
45
INITIAL_XRP
{100
'000'
000
'000 * DROPS_PER_XRP };
46
48
inline
49
bool isLegalAmount (XRPAmount const& amount)
50
{
51
return amount <= INITIAL_XRP;
52
}
53
54
/* The currency code for the native currency. */
55
static inline
56
std::string const&
57
systemCurrencyCode ()
58
{
59
static std::string const code = "XRP";
60
return code;
61
}
62
64
static
65
std::uint32_t constexpr
66
XRP_LEDGER_EARLIEST_SEQ {32570};
67
68
} // ripple
69
70
#endif
std::string
STL class.
ripple::INITIAL_XRP
constexpr XRPAmount INITIAL_XRP
Configure the native currency.
Definition:
SystemParameters.h:45
cstdint
ripple
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition:
RCLCensorshipDetector.h:29
ripple::systemName
static std::string const & systemName()
Definition:
SystemParameters.h:34
string
Generated by
1.8.17