diff options
author | Andrew Chow <achow101-github@achow101.com> | 2020-10-22 13:59:18 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2020-11-18 12:00:57 -0500 |
commit | 8f7b93047581c67f2133cdb8c7845471de66c30f (patch) | |
tree | 69c47944462ea9cc18aa1f84adc20dff626e171f /src/clientversion.cpp | |
parent | 50e019a97a5b49caee867ec7d630fca908caed9d (diff) |
Drop the leading 0 from the version number
Removes the leading 0 from the version number. The minor version, which
we had been using as the major version, is now the major version. The
revision, which we had been using as the minor version, is now the minor
version. The revision number is dropped. The build number is promoted to
being part of the version number. This also avoids issues where it was
accidentally not included in the version number.
The CLIENT_VERSION remains the same format as previous as previously,
the Major version was 0 so that was never a factor in CLIENT_VERSION.
Diffstat (limited to 'src/clientversion.cpp')
-rw-r--r-- | src/clientversion.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/clientversion.cpp b/src/clientversion.cpp index 993967a180..aaf041602b 100644 --- a/src/clientversion.cpp +++ b/src/clientversion.cpp @@ -30,8 +30,7 @@ const std::string CLIENT_NAME("Satoshi"); #define BUILD_DESC BUILD_GIT_TAG #define BUILD_SUFFIX "" #else - #define BUILD_DESC "v" STRINGIZE(CLIENT_VERSION_MAJOR) "." STRINGIZE(CLIENT_VERSION_MINOR) \ - "." STRINGIZE(CLIENT_VERSION_REVISION) "." STRINGIZE(CLIENT_VERSION_BUILD) + #define BUILD_DESC "v" STRINGIZE(CLIENT_VERSION_MAJOR) "." STRINGIZE(CLIENT_VERSION_MINOR) "." STRINGIZE(CLIENT_VERSION_BUILD) #ifdef BUILD_GIT_COMMIT #define BUILD_SUFFIX "-" BUILD_GIT_COMMIT #elif defined(GIT_COMMIT_ID) @@ -45,10 +44,7 @@ const std::string CLIENT_BUILD(BUILD_DESC BUILD_SUFFIX); static std::string FormatVersion(int nVersion) { - if (nVersion % 100 == 0) - return strprintf("%d.%d.%d", nVersion / 1000000, (nVersion / 10000) % 100, (nVersion / 100) % 100); - else - return strprintf("%d.%d.%d.%d", nVersion / 1000000, (nVersion / 10000) % 100, (nVersion / 100) % 100, nVersion % 100); + return strprintf("%d.%d.%d", nVersion / 10000, (nVersion / 100) % 100, nVersion % 100); } std::string FormatFullVersion() |