Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
clientversion.h
Go to the documentation of this file.
1// Copyright (c) 2009-2016 The Bitcoin Core developers
2// Copyright (c) 2017-2019 The Bitcoin developers
3// Distributed under the MIT software license, see the accompanying
4// file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
6#ifndef BITCOIN_CLIENTVERSION_H
7#define BITCOIN_CLIENTVERSION_H
8
9#include <util/macros.h>
10
11#if defined(HAVE_CONFIG_H)
12#include <config/bitcoin-config.h>
13#endif // HAVE_CONFIG_H
14#include <config/version.h>
15
16// Check that required client information is defined
17#if !defined(CLIENT_VERSION_MAJOR) || !defined(CLIENT_VERSION_MINOR) || \
18 !defined(CLIENT_VERSION_REVISION) || !defined(COPYRIGHT_YEAR) || \
19 !defined(CLIENT_VERSION_IS_RELEASE)
20#error Client version information missing: version is not defined by bitcoin-config.h nor defined any other way
21#endif
22
24#define COPYRIGHT_STR \
25 "2009-" STRINGIZE(COPYRIGHT_YEAR) " " COPYRIGHT_HOLDERS_FINAL
26
33#if !defined(WINDRES_PREPROC)
34
35#include <string>
36#include <vector>
37
38static constexpr int CLIENT_VERSION = 1000000 * CLIENT_VERSION_MAJOR +
39 10000 * CLIENT_VERSION_MINOR +
41
42extern const std::string CLIENT_NAME;
43extern const std::string CLIENT_BUILD;
44
45std::string FormatVersion(int nVersion);
46std::string FormatFullVersion();
47std::string FormatUserAgent(const std::string &name, const std::string &version,
48 const std::vector<std::string> &comments);
49
50std::string CopyrightHolders(const std::string &strPrefix);
51
53std::string LicenseInfo();
54
55#endif // WINDRES_PREPROC
56
57#endif // BITCOIN_CLIENTVERSION_H
const std::string CLIENT_BUILD
std::string CopyrightHolders(const std::string &strPrefix)
static constexpr int CLIENT_VERSION
bitcoind-res.rc includes this file, but it cannot cope with real c++ code.
std::string FormatVersion(int nVersion)
std::string FormatFullVersion()
std::string LicenseInfo()
Returns licensing information (for -version)
const std::string CLIENT_NAME
std::string FormatUserAgent(const std::string &name, const std::string &version, const std::vector< std::string > &comments)
Format the subversion field according to BIP 14 spec.
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
Definition random.h:85
const char * name
Definition rest.cpp:47