rippled
Functions | Variables
ripple::BuildInfo Namespace Reference

Versioning information for this build. More...

Functions

std::string const & getVersionString ()
 Server version. More...
 
std::string const & getFullVersionString ()
 Full server version string. More...
 
std::uint64_t encodeSoftwareVersion (char const *const versionStr)
 Encode an arbitrary server software version in a 64-bit integer. More...
 
std::uint64_t getEncodedVersion ()
 Returns this server's version packed in a 64-bit integer. More...
 
bool isRippledVersion (std::uint64_t version)
 Check if the encoded software version is a rippled software version. More...
 
bool isNewerVersion (std::uint64_t version)
 Check if the version is newer than the local node's rippled software version. More...
 

Variables

char const *const versionString = "1.11.0-rc2"
 
static constexpr std::uint64_t implementationVersionIdentifier
 
static constexpr std::uint64_t implementationVersionIdentifierMask
 

Detailed Description

Versioning information for this build.

Function Documentation

◆ getVersionString()

std::string const & ripple::BuildInfo::getVersionString ( )

Server version.

Follows the Semantic Versioning Specification: http://semver.org/

Definition at line 65 of file BuildInfo.cpp.

◆ getFullVersionString()

std::string const & ripple::BuildInfo::getFullVersionString ( )

Full server version string.

This includes the name of the server. It is used in the peer protocol hello message and also the headers of some HTTP replies.

Definition at line 78 of file BuildInfo.cpp.

◆ encodeSoftwareVersion()

std::uint64_t ripple::BuildInfo::encodeSoftwareVersion ( char const *const  versionStr)

Encode an arbitrary server software version in a 64-bit integer.

The general format is:

........-........-........-........-........-........-........-........ XXXXXXXX-XXXXXXXX-YYYYYYYY-YYYYYYYY-YYYYYYYY-YYYYYYYY-YYYYYYYY-YYYYYYYY

X: 16 bits identifying the particular implementation Y: 48 bits of data specific to the implementation

The rippled-specific format (implementation ID is: 0x18 0x3B) is:

00011000-00111011-MMMMMMMM-mmmmmmmm-pppppppp-TTNNNNNN-00000000-00000000

M: 8-bit major version (0-255)
m: 8-bit minor version (0-255)
p: 8-bit patch version (0-255)
T: 11 if neither an RC nor a beta
   10 if an RC
   01 if a beta
N: 6-bit rc/beta number (1-63)
Parameters
theversion string
Returns
the encoded version in a 64-bit integer

Definition at line 90 of file BuildInfo.cpp.

◆ getEncodedVersion()

std::uint64_t ripple::BuildInfo::getEncodedVersion ( )

Returns this server's version packed in a 64-bit integer.

Definition at line 155 of file BuildInfo.cpp.

◆ isRippledVersion()

bool ripple::BuildInfo::isRippledVersion ( std::uint64_t  version)

Check if the encoded software version is a rippled software version.

Parameters
versionanother node's encoded software version
Returns
true if the version is a rippled software version, false otherwise

Definition at line 162 of file BuildInfo.cpp.

◆ isNewerVersion()

bool ripple::BuildInfo::isNewerVersion ( std::uint64_t  version)

Check if the version is newer than the local node's rippled software version.

Parameters
versionanother node's encoded software version
Returns
true if the version is newer than the local node's rippled software version, false otherwise.
Note
This function only understands version numbers that are generated by rippled. Please see the encodeSoftwareVersion() function for detail.

Definition at line 169 of file BuildInfo.cpp.

Variable Documentation

◆ versionString

char const* const ripple::BuildInfo::versionString = "1.11.0-rc2"

Definition at line 36 of file BuildInfo.cpp.

◆ implementationVersionIdentifier

constexpr std::uint64_t ripple::BuildInfo::implementationVersionIdentifier
staticconstexpr
Initial value:
=
0x183B'0000'0000'0000LLU

Definition at line 84 of file BuildInfo.cpp.

◆ implementationVersionIdentifierMask

constexpr std::uint64_t ripple::BuildInfo::implementationVersionIdentifierMask
staticconstexpr
Initial value:
=
0xFFFF'0000'0000'0000LLU

Definition at line 86 of file BuildInfo.cpp.