Bitcoin Core  27.99.0
P2P Digital Currency
clientversion.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2022 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 #if defined(HAVE_CONFIG_H)
11 #include <config/bitcoin-config.h>
12 #endif //HAVE_CONFIG_H
13 
14 // Check that required client information is defined
15 #if !defined(CLIENT_VERSION_MAJOR) || !defined(CLIENT_VERSION_MINOR) || !defined(CLIENT_VERSION_BUILD) || !defined(CLIENT_VERSION_IS_RELEASE) || !defined(COPYRIGHT_YEAR)
16 #error Client version information missing: version is not defined by bitcoin-config.h or in any other way
17 #endif
18 
20 #define COPYRIGHT_STR "2009-" STRINGIZE(COPYRIGHT_YEAR) " " COPYRIGHT_HOLDERS_FINAL
21 
28 #if !defined(WINDRES_PREPROC)
29 
30 #include <string>
31 #include <vector>
32 
33 static const int CLIENT_VERSION =
34  10000 * CLIENT_VERSION_MAJOR
35  + 100 * CLIENT_VERSION_MINOR
37 
38 extern const std::string CLIENT_NAME;
39 
40 
41 std::string FormatFullVersion();
42 std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments);
43 
44 std::string CopyrightHolders(const std::string& strPrefix);
45 
47 std::string LicenseInfo();
48 
49 #endif // WINDRES_PREPROC
50 
51 #endif // BITCOIN_CLIENTVERSION_H
#define CLIENT_VERSION_BUILD
#define CLIENT_VERSION_MAJOR
#define CLIENT_VERSION_MINOR
std::string CopyrightHolders(const std::string &strPrefix)
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...
static const int CLIENT_VERSION
bitcoind-res.rc includes this file, but it cannot cope with real c++ code.
Definition: clientversion.h:33
std::string FormatFullVersion()
std::string LicenseInfo()
Returns licensing information (for -version)
const std::string CLIENT_NAME
const char * name
Definition: rest.cpp:50