Bitcoin Core 29.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#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
26static const int CLIENT_VERSION =
27 10000 * CLIENT_VERSION_MAJOR
28 + 100 * CLIENT_VERSION_MINOR
29 + 1 * CLIENT_VERSION_BUILD;
30
31extern const std::string UA_NAME;
32
33
34std::string FormatFullVersion();
35std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments);
36
37std::string CopyrightHolders(const std::string& strPrefix);
38
40std::string LicenseInfo();
41
42#endif // RC_INVOKED
43
44#endif // BITCOIN_CLIENTVERSION_H
const std::string UA_NAME
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
Definition: clientversion.h:26
std::string FormatFullVersion()
std::string LicenseInfo()
Returns licensing information (for -version)
const char * name
Definition: rest.cpp:49