Bitcoin Core  22.99.0
P2P Digital Currency
clientversion.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2020 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 extern const std::string CLIENT_BUILD;
40 
41 
42 std::string FormatFullVersion();
43 std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments);
44 
45 #endif // WINDRES_PREPROC
46 
47 #endif // BITCOIN_CLIENTVERSION_H
FormatSubVersion
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...
Definition: clientversion.cpp:58
CLIENT_BUILD
const std::string CLIENT_BUILD
macros.h
bitcoin-config.h
FormatFullVersion
std::string FormatFullVersion()
Definition: clientversion.cpp:50
CLIENT_VERSION_BUILD
#define CLIENT_VERSION_BUILD
Definition: bitcoin-config.h:15
CLIENT_NAME
const std::string CLIENT_NAME
name
const char * name
Definition: rest.cpp:43
CLIENT_VERSION_MINOR
#define CLIENT_VERSION_MINOR
Definition: bitcoin-config.h:24
CLIENT_VERSION
static const int CLIENT_VERSION
bitcoind-res.rc includes this file, but it cannot cope with real c++ code.
Definition: clientversion.h:33
CLIENT_VERSION_MAJOR
#define CLIENT_VERSION_MAJOR
Definition: bitcoin-config.h:21