xrpld
Loading...
Searching...
No Matches
ProtocolVersion.h
1#pragma once
2
3#include <cstdint>
4#include <optional>
5#include <string>
6#include <string_view>
7#include <utility>
8#include <vector>
9
10namespace xrpl {
11
19
20constexpr ProtocolVersion
22{
23 return {major, minor};
24}
25
31
46
52
58
62std::string const&
64
68bool
70
79
80} // namespace xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
ProtocolVersion newestSupportedProtocolVersion()
The version negotiated with a peer that speaks everything we speak, so also the one that enables ever...
bool isProtocolSupported(ProtocolVersion const &v)
Determine whether we support a specific protocol version.
std::optional< ProtocolVersion > negotiateProtocolVersion(std::vector< ProtocolVersion > const &versions)
Given a list of supported protocol versions, choose the one we prefer.
std::string to_string(BaseUInt< Bits, Tag > const &a)
Definition base_uint.h:657
constexpr ProtocolVersion makeProtocol(std::uint16_t major, std::uint16_t minor)
std::string const & supportedProtocolVersions()
The list of all the protocol versions we support.
std::pair< std::uint16_t, std::uint16_t > ProtocolVersion
Represents a particular version of the peer-to-peer protocol.
std::vector< ProtocolVersion > parseProtocolVersions(std::string_view value)
Parse a set of protocol versions.