1#include <xrpl/basics/contract.h>
2#include <xrpl/beast/core/LexicalCast.h>
3#include <xrpl/beast/core/SemanticVersion.h>
4#include <xrpl/git/Git.h>
5#include <xrpl/protocol/BuildInfo.h>
6#include <xrpl/protocol/SystemParameters.h>
8#include <boost/preprocessor/stringize.hpp>
26char const*
const versionString =
"3.2.0-b0"
39#if defined(DEBUG) || defined(SANITIZERS)
43 if (!commitHash.
empty())
44 metadata += commitHash +
".";
50#if defined(DEBUG) && defined(SANITIZERS)
55 metadata += BOOST_PP_STRINGIZE(SANITIZERS);
58 if (!metadata.
empty())
59 version +=
"+" + metadata;
98 if (v.
parse(versionStr))
125 if (prefix != identifier.
substr(0, prefix.length()))
138 x = parsePreRelease(
id,
"rc", 0x80, 0, 63);
141 x = parsePreRelease(
id,
"b", 0x40, 0, 63);
A Semantic Version number.
identifier_list preReleaseIdentifiers
bool isPreRelease() const noexcept
bool parse(std::string_view input)
Parse a semantic version string.
std::string print() const
Produce a string from semantic version components.
bool lexicalCastChecked(Out &out, In in)
Intelligently convert from one type to another.
std::string const & getFullVersionString()
Full server version string.
static constexpr std::uint64_t implementationVersionIdentifierMask
std::uint64_t getEncodedVersion()
Returns this server's version packed in a 64-bit integer.
bool isNewerVersion(std::uint64_t version)
Check if the version is newer than the local node's rippled software version.
static constexpr std::uint64_t implementationVersionIdentifier
std::uint64_t encodeSoftwareVersion(std::string_view versionStr)
Encode an arbitrary server software version in a 64-bit integer.
bool isRippledVersion(std::uint64_t version)
Check if the encoded software version is a rippled software version.
std::string const & getVersionString()
Server version.
std::string const & getCommitHash()
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
void LogicError(std::string const &how) noexcept
Called when faulty logic causes a broken invariant.
static std::string const & systemName()