Bitcoin Core 28.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
26#if !defined(WINDRES_PREPROC)
27
28#include <string>
29#include <vector>
30
31static const int CLIENT_VERSION =
32 10000 * CLIENT_VERSION_MAJOR
33 + 100 * CLIENT_VERSION_MINOR
34 + 1 * CLIENT_VERSION_BUILD;
35
36extern const std::string UA_NAME;
37
38
39std::string FormatFullVersion();
40std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments);
41
42std::string CopyrightHolders(const std::string& strPrefix);
43
45std::string LicenseInfo();
46
47#endif // WINDRES_PREPROC
48
49#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
bitcoind-res.rc includes this file, but it cannot cope with real c++ code.
Definition: clientversion.h:31
std::string FormatFullVersion()
std::string LicenseInfo()
Returns licensing information (for -version)
const char * name
Definition: rest.cpp:49