20 #include <ripple/basics/contract.h>
21 #include <ripple/beast/core/LexicalCast.h>
22 #include <ripple/beast/core/SemanticVersion.h>
23 #include <ripple/protocol/BuildInfo.h>
24 #include <boost/preprocessor/stringize.hpp>
39 #if defined(DEBUG) || defined(SANITIZER)
41 #ifdef GIT_COMMIT_HASH
53 BOOST_PP_STRINGIZE(SANITIZER)
85 0x183B
'0000'0000
'0000LLU;
86 static constexpr std::uint64_t implementationVersionIdentifierMask =
87 0xFFFF'0000
'0000'0000LLU;
123 if (prefix != identifier.
substr(0, prefix.length()))
137 x = parsePreRelease(
id,
"rc", 0x80, 0, 63);
140 x = parsePreRelease(
id,
"b", 0x40, 0, 63);
std::uint64_t getEncodedVersion()
Returns this server's version packed in a 64-bit integer.
std::string print() const
Produce a string from semantic version components.
std::uint64_t encodeSoftwareVersion(char const *const versionStr)
Encode an arbitrary server software version in a 64-bit integer.
bool isPreRelease() const noexcept
A Semantic Version number.
static constexpr std::uint64_t implementationVersionIdentifier
bool isRippledVersion(std::uint64_t version)
Check if the encoded software version is a rippled software version.
identifier_list preReleaseIdentifiers
std::string const & getVersionString()
Server version.
bool isNewerVersion(std::uint64_t version)
Check if the version is newer than the local node's rippled software version.
std::string const & getFullVersionString()
Full server version string.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
bool parse(std::string const &input)
Parse a semantic version string.
char const *const versionString
bool lexicalCastChecked(Out &out, In in)
Intelligently convert from one type to another.
void LogicError(std::string const &how) noexcept
Called when faulty logic causes a broken invariant.
static constexpr std::uint64_t implementationVersionIdentifierMask