Skip to content

Commit 6395ba3

Browse files
committed
Update comments in version to be doxygen compatible
1 parent 8d2396c commit 6395ba3

File tree

2 files changed

+44
-36
lines changed

2 files changed

+44
-36
lines changed

src/clientversion.cpp

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

55
#include "clientversion.h"
@@ -8,35 +8,41 @@
88

99
#include <string>
1010

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+
*/
1416
const std::string CLIENT_NAME("Satoshi");
1517

16-
// Client version number
18+
/**
19+
* Client version number
20+
*/
1721
#define CLIENT_VERSION_SUFFIX ""
1822

1923

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
3541
#ifdef HAVE_BUILD_INFO
3642
#include "build.h"
3743
#endif
3844

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$
4046
#ifdef GIT_ARCHIVE
4147
#define GIT_COMMIT_ID "$Format:%h$"
4248
#define GIT_COMMIT_DATE "$Format:%cD$"
@@ -85,7 +91,9 @@ std::string FormatFullVersion()
8591
return CLIENT_BUILD;
8692
}
8793

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+
*/
8997
std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments)
9098
{
9199
std::ostringstream ss;

src/version.h

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
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
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

55
#ifndef BITCOIN_VERSION_H
66
#define BITCOIN_VERSION_H
77

8-
//
9-
// network protocol versioning
10-
//
8+
/**
9+
* network protocol versioning
10+
*/
1111

1212
static const int PROTOCOL_VERSION = 70002;
1313

14-
// initial proto version, to be increased after version/verack negotiation
14+
//! initial proto version, to be increased after version/verack negotiation
1515
static const int INIT_PROTO_VERSION = 209;
1616

17-
// In this version, 'getheaders' was introduced.
17+
//! In this version, 'getheaders' was introduced.
1818
static const int GETHEADERS_VERSION = 31800;
1919

20-
// disconnect from peers older than this proto version
20+
//! disconnect from peers older than this proto version
2121
static const int MIN_PEER_PROTO_VERSION = GETHEADERS_VERSION;
2222

23-
// nTime field added to CAddress, starting with this version;
24-
// if possible, avoid requesting addresses nodes older than this
23+
//! nTime field added to CAddress, starting with this version;
24+
//! if possible, avoid requesting addresses nodes older than this
2525
static const int CADDR_TIME_VERSION = 31402;
2626

27-
// only request blocks from nodes outside this range of versions
27+
//! only request blocks from nodes outside this range of versions
2828
static const int NOBLKS_VERSION_START = 32000;
2929
static const int NOBLKS_VERSION_END = 32400;
3030

31-
// BIP 0031, pong message, is enabled for all versions AFTER this one
31+
//! BIP 0031, pong message, is enabled for all versions AFTER this one
3232
static const int BIP0031_VERSION = 60000;
3333

34-
// "mempool" command, enhanced "getdata" behavior starts with this version
34+
//! "mempool" command, enhanced "getdata" behavior starts with this version
3535
static const int MEMPOOL_GD_VERSION = 60002;
3636

3737
#endif // BITCOIN_VERSION_H

0 commit comments

Comments
 (0)