//------------------------------------------------------------------------------ /* This file is part of rippled: https://github.com/ripple/rippled Copyright (c) 2012, 2013 Ripple Labs Inc. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ //============================================================================== #ifndef RIPPLE_PROTOCOL_SYSTEMPARAMETERS_H_INCLUDED #define RIPPLE_PROTOCOL_SYSTEMPARAMETERS_H_INCLUDED #include #include #include #include namespace ripple { // Various protocol and system specific constant globals. /* The name of the system. */ inline constexpr std::string_view systemName = "xahau"; /* The currency code for the native currency. */ inline constexpr std::string_view systemCurrencyCode = "XAH"; /** Number of drops in the genesis account. */ inline constexpr XRPAmount INITIAL_XRP{100'000'000'000 * DROPS_PER_XRP}; /** Returns true if the amount does not exceed the initial XRP in existence. */ inline bool isLegalAmount(XRPAmount const& amount) noexcept { return amount <= INITIAL_XRP; } /** Returns true if the absolute value of the amount does not exceed the initial * XRP in existence. */ inline bool isLegalAmountSigned(XRPAmount const& amount) noexcept { return amount >= -INITIAL_XRP && amount <= INITIAL_XRP; } /** The XRP ledger network's earliest allowed sequence */ inline constexpr std::uint32_t XRP_LEDGER_EARLIEST_SEQ{1U}; /** The minimum amount of support an amendment should have. @note This value is used by legacy code and will become obsolete once the fixAmendmentMajorityCalc amendment activates. */ inline constexpr std::ratio<204, 256> preFixAmendmentMajorityCalcThreshold; inline constexpr std::ratio<80, 100> postFixAmendmentMajorityCalcThreshold; /** The minimum amount of time an amendment must hold a majority */ constexpr std::chrono::seconds const defaultAmendmentMajorityTime = std::chrono::days{5}; } // namespace ripple /** Default peer port (IANA registered) */ inline std::uint16_t constexpr DEFAULT_PEER_PORT{21337}; #endif