|
1 |
| -// Copyright (c) 2012 The Bitcoin developers |
2 |
| -// Distributed under the MIT/X11 software license, see the accompanying |
| 1 | +// Copyright (c) 2012-2014 The Bitcoin developers |
| 2 | +// Distributed under the MIT software license, see the accompanying |
3 | 3 | // file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
4 | 4 |
|
5 | 5 | #include "clientversion.h"
|
|
8 | 8 |
|
9 | 9 | #include <string>
|
10 | 10 |
|
11 |
| -// Name of client reported in the 'version' message. Report the same name |
12 |
| -// for both bitcoind and bitcoin-qt, to make it harder for attackers to |
13 |
| -// target servers or GUI users specifically. |
| 11 | +/** |
| 12 | + * Name of client reported in the 'version' message. Report the same name |
| 13 | + * for both bitcoind and bitcoin-core, to make it harder for attackers to |
| 14 | + * target servers or GUI users specifically. |
| 15 | + */ |
14 | 16 | const std::string CLIENT_NAME("Satoshi");
|
15 | 17 |
|
16 |
| -// Client version number |
| 18 | +/** |
| 19 | + * Client version number |
| 20 | + */ |
17 | 21 | #define CLIENT_VERSION_SUFFIX ""
|
18 | 22 |
|
19 | 23 |
|
20 |
| -// The following part of the code determines the CLIENT_BUILD variable. |
21 |
| -// Several mechanisms are used for this: |
22 |
| -// * first, if HAVE_BUILD_INFO is defined, include build.h, a file that is |
23 |
| -// generated by the build environment, possibly containing the output |
24 |
| -// of git-describe in a macro called BUILD_DESC |
25 |
| -// * secondly, if this is an exported version of the code, GIT_ARCHIVE will |
26 |
| -// be defined (automatically using the export-subst git attribute), and |
27 |
| -// GIT_COMMIT will contain the commit id. |
28 |
| -// * then, three options exist for determining CLIENT_BUILD: |
29 |
| -// * if BUILD_DESC is defined, use that literally (output of git-describe) |
30 |
| -// * if not, but GIT_COMMIT is defined, use v[maj].[min].[rev].[build]-g[commit] |
31 |
| -// * otherwise, use v[maj].[min].[rev].[build]-unk |
32 |
| -// finally CLIENT_VERSION_SUFFIX is added |
33 |
| - |
34 |
| -// First, include build.h if requested |
| 24 | +/** |
| 25 | + * The following part of the code determines the CLIENT_BUILD variable. |
| 26 | + * Several mechanisms are used for this: |
| 27 | + * * first, if HAVE_BUILD_INFO is defined, include build.h, a file that is |
| 28 | + * generated by the build environment, possibly containing the output |
| 29 | + * of git-describe in a macro called BUILD_DESC |
| 30 | + * * secondly, if this is an exported version of the code, GIT_ARCHIVE will |
| 31 | + * be defined (automatically using the export-subst git attribute), and |
| 32 | + * GIT_COMMIT will contain the commit id. |
| 33 | + * * then, three options exist for determining CLIENT_BUILD: |
| 34 | + * * if BUILD_DESC is defined, use that literally (output of git-describe) |
| 35 | + * * if not, but GIT_COMMIT is defined, use v[maj].[min].[rev].[build]-g[commit] |
| 36 | + * * otherwise, use v[maj].[min].[rev].[build]-unk |
| 37 | + * finally CLIENT_VERSION_SUFFIX is added |
| 38 | + */ |
| 39 | + |
| 40 | +//! First, include build.h if requested |
35 | 41 | #ifdef HAVE_BUILD_INFO
|
36 | 42 | #include "build.h"
|
37 | 43 | #endif
|
38 | 44 |
|
39 |
| -// git will put "#define GIT_ARCHIVE 1" on the next line inside archives. $Format:%n#define GIT_ARCHIVE 1$ |
| 45 | +//! git will put "#define GIT_ARCHIVE 1" on the next line inside archives. $Format:%n#define GIT_ARCHIVE 1$ |
40 | 46 | #ifdef GIT_ARCHIVE
|
41 | 47 | #define GIT_COMMIT_ID "$Format:%h$"
|
42 | 48 | #define GIT_COMMIT_DATE "$Format:%cD$"
|
@@ -85,7 +91,9 @@ std::string FormatFullVersion()
|
85 | 91 | return CLIENT_BUILD;
|
86 | 92 | }
|
87 | 93 |
|
88 |
| -// Format the subversion field according to BIP 14 spec (https://en.bitcoin.it/wiki/BIP_0014) |
| 94 | +/** |
| 95 | + * Format the subversion field according to BIP 14 spec (https://github.com/bitcoin/bips/blob/master/bip-0014.mediawiki) |
| 96 | + */ |
89 | 97 | std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments)
|
90 | 98 | {
|
91 | 99 | std::ostringstream ss;
|
|
0 commit comments