Bitcoin Core  31.0.0
P2P Digital Currency
clientversion.h
Go to the documentation of this file.
1 // Copyright (c) 2009-present The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef BITCOIN_CLIENTVERSION_H
6 #define BITCOIN_CLIENTVERSION_H
7 
8 #include <util/macros.h>
9 
10 #include <bitcoin-build-config.h> // IWYU pragma: keep
11 
12 // Check that required client information is defined
13 #if !defined(CLIENT_VERSION_MAJOR) || !defined(CLIENT_VERSION_MINOR) || !defined(CLIENT_VERSION_BUILD) || !defined(CLIENT_VERSION_IS_RELEASE) || !defined(COPYRIGHT_YEAR)
14 #error Client version information missing: version is not defined by bitcoin-build-config.h or in any other way
15 #endif
16 
18 #define COPYRIGHT_STR "2009-" STRINGIZE(COPYRIGHT_YEAR) " " COPYRIGHT_HOLDERS_FINAL
19 
20 // Windows .rc files include this header, but they cannot cope with real C++ code.
21 #if !defined(RC_INVOKED)
22 
23 #include <string>
24 #include <vector>
25 
26 static const int CLIENT_VERSION =
27  10000 * CLIENT_VERSION_MAJOR
28  + 100 * CLIENT_VERSION_MINOR
29  + 1 * CLIENT_VERSION_BUILD;
30 
31 extern const std::string UA_NAME;
32 
33 
34 std::string FormatFullVersion();
35 std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments);
36 
37 std::string CopyrightHolders(const std::string& strPrefix);
38 
40 std::string LicenseInfo();
41 
42 #endif // RC_INVOKED
43 
44 #endif // BITCOIN_CLIENTVERSION_H
std::string FormatSubVersion(const std::string &name, int nClientVersion, const std::vector< std::string > &comments)
Format the subversion field according to BIP 14 spec (https://github.com/bitcoin/bips/blob/master/bip...
const std::string UA_NAME
std::string CopyrightHolders(const std::string &strPrefix)
std::string LicenseInfo()
Returns licensing information (for -version)
const char * name
Definition: rest.cpp:48
std::string FormatFullVersion()
static const int CLIENT_VERSION
Definition: clientversion.h:26