1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00
lokinet/llarp/constants/version.cpp.in
Jason Rhinelander 1a7f47f5cd
Fix version encoding
We are reinterpret_cast'ing the version to a string to send it as raw
bytes, but it was sending \x00\x00\x09 instead of \x00\x09\x0a because
the version constant was actually a uint16_t array.

This just makes the version constant a uint8_t array instead so that it
works (and I am not at all worried about any version component getting
larger than 255).
2023-12-11 15:03:52 -04:00

15 lines
605 B
C++

#include <llarp/constants/version.hpp>
#include <llarp/constants/proto.hpp>
namespace llarp
{
// clang-format off
const std::array<uint8_t, 3> LOKINET_VERSION{{@lokinet_VERSION_MAJOR@, @lokinet_VERSION_MINOR@, @lokinet_VERSION_PATCH@}};
const char* const LOKINET_VERSION_TAG = "@VERSIONTAG@";
const char* const LOKINET_VERSION_FULL = "lokinet-@lokinet_VERSION_MAJOR@.@lokinet_VERSION_MINOR@.@lokinet_VERSION_PATCH@-@LOKINET_VERSION_TAG@";
const char* const LOKINET_DEFAULT_NETID = "lokinet";
const char* const LOKINET_TESTNET_NETID = "testnet";
// clang-format on
} // namespace llarp