oxen-core/src/version.h
Jason Rhinelander 8a276b362f Store loki version as std::array<u16,3> everywhere
Currently we store it as various different things: 3 separate ints, 2
u16s, 3 separate u16s, and a vector of u16s.  This unifies all version
values to a `std::array<uint16_t,3>`.

- LOKI_VERSION_{MAJOR,MINOR,PATCH} are now just LOKI_VERSION
- The previous LOKI_VERSION (C-string of the version) is now renamed
  LOKI_VERSION_STR

A related change included here is that the restricted RPC now returns
the major version in the get_info rpc call instead of an empty string
(e.g. "5" instead of "").  There is almost certainly enough difference
in the RPC results to distinguish major versions already so this doesn't
seem like it actually leaks anything significant.
2019-11-27 14:07:52 -04:00

11 lines
276 B
C++

#pragma once
#include <cstdint>
#include <array>
extern const std::array<uint16_t, 3> LOKI_VERSION;
extern const char* const LOKI_VERSION_TAG;
extern const char* const LOKI_VERSION_STR;
extern const char* const LOKI_RELEASE_NAME;
extern const char* const LOKI_VERSION_FULL;