Skip to content

Commit 72fb3d2

Browse files
committed
Update comments in src/rpc* to be doxygen compatible
1 parent b5d1b10 commit 72fb3d2

File tree

12 files changed

+83
-80
lines changed

12 files changed

+83
-80
lines changed

src/rpcblockchain.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright (c) 2010 Satoshi Nakamoto
2-
// Copyright (c) 2009-2013 The Bitcoin developers
3-
// Distributed under the MIT/X11 software license, see the accompanying
2+
// Copyright (c) 2009-2014 The Bitcoin developers
3+
// Distributed under the MIT software license, see the accompanying
44
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
55

66
#include "checkpoints.h"
@@ -468,7 +468,7 @@ Value getblockchaininfo(const Array& params, bool fHelp)
468468
return obj;
469469
}
470470

471-
/* Comparison function for sorting the getchaintips heads. */
471+
/** Comparison function for sorting the getchaintips heads. */
472472
struct CompareBlocksByHeight
473473
{
474474
bool operator()(const CBlockIndex* a, const CBlockIndex* b) const

src/rpcclient.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright (c) 2010 Satoshi Nakamoto
2-
// Copyright (c) 2009-2013 The Bitcoin developers
3-
// Distributed under the MIT/X11 software license, see the accompanying
2+
// Copyright (c) 2009-2014 The Bitcoin developers
3+
// Distributed under the MIT software license, see the accompanying
44
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
55

66
#include "rpcclient.h"
@@ -18,8 +18,8 @@ using namespace json_spirit;
1818
class CRPCConvertParam
1919
{
2020
public:
21-
std::string methodName; // method whose params want conversion
22-
int paramIdx; // 0-based idx of param to convert
21+
std::string methodName; //! method whose params want conversion
22+
int paramIdx; //! 0-based idx of param to convert
2323
};
2424

2525
static const CRPCConvertParam vRPCConvertParams[] =
@@ -116,7 +116,7 @@ CRPCConvertTable::CRPCConvertTable()
116116

117117
static CRPCConvertTable rpcCvtTable;
118118

119-
// Convert strings to command-specific RPC representation
119+
/** Convert strings to command-specific RPC representation */
120120
Array RPCConvertValues(const std::string &strMethod, const std::vector<std::string> &strParams)
121121
{
122122
Array params;

src/rpcclient.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright (c) 2010 Satoshi Nakamoto
2-
// Copyright (c) 2009-2013 The Bitcoin developers
3-
// Distributed under the MIT/X11 software license, see the accompanying
2+
// Copyright (c) 2009-2014 The Bitcoin developers
3+
// Distributed under the MIT software license, see the accompanying
44
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
55

66
#ifndef BITCOIN_RPCCLIENT_H

src/rpcdump.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Copyright (c) 2009-2014 The Bitcoin developers
2-
// Distributed under the MIT/X11 software license, see the accompanying
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 "base58.h"

src/rpcmining.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright (c) 2010 Satoshi Nakamoto
2-
// Copyright (c) 2009-2013 The Bitcoin developers
3-
// Distributed under the MIT/X11 software license, see the accompanying
2+
// Copyright (c) 2009-2014 The Bitcoin developers
3+
// Distributed under the MIT software license, see the accompanying
44
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
55

66
#include "amount.h"
@@ -28,9 +28,11 @@
2828
using namespace json_spirit;
2929
using namespace std;
3030

31-
// Return average network hashes per second based on the last 'lookup' blocks,
32-
// or from the last difficulty change if 'lookup' is nonpositive.
33-
// If 'height' is nonnegative, compute the estimate at the time when a given block was found.
31+
/**
32+
* Return average network hashes per second based on the last 'lookup' blocks,
33+
* or from the last difficulty change if 'lookup' is nonpositive.
34+
* If 'height' is nonnegative, compute the estimate at the time when a given block was found.
35+
*/
3436
Value GetNetworkHashPS(int lookup, int height) {
3537
CBlockIndex *pb = chainActive.Tip();
3638

src/rpcmisc.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright (c) 2010 Satoshi Nakamoto
22
// Copyright (c) 2009-2014 The Bitcoin developers
3-
// Distributed under the MIT/X11 software license, see the accompanying
3+
// Distributed under the MIT software license, see the accompanying
44
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
55

66
#include "base58.h"
@@ -30,7 +30,7 @@ using namespace std;
3030

3131
/**
3232
* @note Do not add or change anything in the information returned by this
33-
* method. `getinfo` exists for backwards-compatibilty only. It combines
33+
* method. `getinfo` exists for backwards-compatibility only. It combines
3434
* information from wildly different sources in the program, which is a mess,
3535
* and is thus planned to be deprecated eventually.
3636
*
@@ -198,9 +198,9 @@ Value validateaddress(const Array& params, bool fHelp)
198198
return ret;
199199
}
200200

201-
//
202-
// Used by addmultisigaddress / createmultisig:
203-
//
201+
/**
202+
* Used by addmultisigaddress / createmultisig:
203+
*/
204204
CScript _createmultisig_redeemScript(const Array& params)
205205
{
206206
int nRequired = params[0].get_int();

src/rpcnet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Copyright (c) 2009-2014 The Bitcoin developers
2-
// Distributed under the MIT/X11 software license, see the accompanying
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 "rpcserver.h"

src/rpcprotocol.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright (c) 2010 Satoshi Nakamoto
22
// Copyright (c) 2009-2014 The Bitcoin developers
3-
// Distributed under the MIT/X11 software license, see the accompanying
3+
// Distributed under the MIT software license, see the accompanying
44
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
55

66
#include "rpcprotocol.h"
@@ -30,15 +30,15 @@ using namespace boost;
3030
using namespace boost::asio;
3131
using namespace json_spirit;
3232

33-
// Number of bytes to allocate and read at most at once in post data
33+
//! Number of bytes to allocate and read at most at once in post data
3434
const size_t POST_READ_SIZE = 256 * 1024;
3535

36-
//
37-
// HTTP protocol
38-
//
39-
// This ain't Apache. We're just using HTTP header for the length field
40-
// and to be compatible with other JSON-RPC implementations.
41-
//
36+
/**
37+
* HTTP protocol
38+
*
39+
* This ain't Apache. We're just using HTTP header for the length field
40+
* and to be compatible with other JSON-RPC implementations.
41+
*/
4242

4343
string HTTPPost(const string& strMsg, const map<string,string>& mapRequestHeaders)
4444
{
@@ -246,15 +246,15 @@ int ReadHTTPMessage(std::basic_istream<char>& stream, map<string,
246246
return HTTP_OK;
247247
}
248248

249-
//
250-
// JSON-RPC protocol. Bitcoin speaks version 1.0 for maximum compatibility,
251-
// but uses JSON-RPC 1.1/2.0 standards for parts of the 1.0 standard that were
252-
// unspecified (HTTP errors and contents of 'error').
253-
//
254-
// 1.0 spec: http://json-rpc.org/wiki/specification
255-
// 1.2 spec: http://jsonrpc.org/historical/json-rpc-over-http.html
256-
// http://www.codeproject.com/KB/recipes/JSON_Spirit.aspx
257-
//
249+
/**
250+
* JSON-RPC protocol. Bitcoin speaks version 1.0 for maximum compatibility,
251+
* but uses JSON-RPC 1.1/2.0 standards for parts of the 1.0 standard that were
252+
* unspecified (HTTP errors and contents of 'error').
253+
*
254+
* 1.0 spec: http://json-rpc.org/wiki/specification
255+
* 1.2 spec: http://jsonrpc.org/historical/json-rpc-over-http.html
256+
* http://www.codeproject.com/KB/recipes/JSON_Spirit.aspx
257+
*/
258258

259259
string JSONRPCRequest(const string& strMethod, const Array& params, const Value& id)
260260
{

src/rpcprotocol.h

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright (c) 2010 Satoshi Nakamoto
22
// Copyright (c) 2009-2014 The Bitcoin developers
3-
// Distributed under the MIT/X11 software license, see the accompanying
3+
// Distributed under the MIT software license, see the accompanying
44
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
55

66
#ifndef BITCOIN_RPCPROTOCOL_H
@@ -19,7 +19,7 @@
1919
#include "json/json_spirit_utils.h"
2020
#include "json/json_spirit_writer_template.h"
2121

22-
// HTTP status codes
22+
//! HTTP status codes
2323
enum HTTPStatusCode
2424
{
2525
HTTP_OK = 200,
@@ -30,56 +30,56 @@ enum HTTPStatusCode
3030
HTTP_INTERNAL_SERVER_ERROR = 500,
3131
};
3232

33-
// Bitcoin RPC error codes
33+
//! Bitcoin RPC error codes
3434
enum RPCErrorCode
3535
{
36-
// Standard JSON-RPC 2.0 errors
36+
//! Standard JSON-RPC 2.0 errors
3737
RPC_INVALID_REQUEST = -32600,
3838
RPC_METHOD_NOT_FOUND = -32601,
3939
RPC_INVALID_PARAMS = -32602,
4040
RPC_INTERNAL_ERROR = -32603,
4141
RPC_PARSE_ERROR = -32700,
4242

43-
// General application defined errors
44-
RPC_MISC_ERROR = -1, // std::exception thrown in command handling
45-
RPC_FORBIDDEN_BY_SAFE_MODE = -2, // Server is in safe mode, and command is not allowed in safe mode
46-
RPC_TYPE_ERROR = -3, // Unexpected type was passed as parameter
47-
RPC_INVALID_ADDRESS_OR_KEY = -5, // Invalid address or key
48-
RPC_OUT_OF_MEMORY = -7, // Ran out of memory during operation
49-
RPC_INVALID_PARAMETER = -8, // Invalid, missing or duplicate parameter
50-
RPC_DATABASE_ERROR = -20, // Database error
51-
RPC_DESERIALIZATION_ERROR = -22, // Error parsing or validating structure in raw format
52-
RPC_VERIFY_ERROR = -25, // General error during transaction or block submission
53-
RPC_VERIFY_REJECTED = -26, // Transaction or block was rejected by network rules
54-
RPC_VERIFY_ALREADY_IN_CHAIN = -27, // Transaction already in chain
55-
RPC_IN_WARMUP = -28, // Client still warming up
43+
//! General application defined errors
44+
RPC_MISC_ERROR = -1, //! std::exception thrown in command handling
45+
RPC_FORBIDDEN_BY_SAFE_MODE = -2, //! Server is in safe mode, and command is not allowed in safe mode
46+
RPC_TYPE_ERROR = -3, //! Unexpected type was passed as parameter
47+
RPC_INVALID_ADDRESS_OR_KEY = -5, //! Invalid address or key
48+
RPC_OUT_OF_MEMORY = -7, //! Ran out of memory during operation
49+
RPC_INVALID_PARAMETER = -8, //! Invalid, missing or duplicate parameter
50+
RPC_DATABASE_ERROR = -20, //! Database error
51+
RPC_DESERIALIZATION_ERROR = -22, //! Error parsing or validating structure in raw format
52+
RPC_VERIFY_ERROR = -25, //! General error during transaction or block submission
53+
RPC_VERIFY_REJECTED = -26, //! Transaction or block was rejected by network rules
54+
RPC_VERIFY_ALREADY_IN_CHAIN = -27, //! Transaction already in chain
55+
RPC_IN_WARMUP = -28, //! Client still warming up
5656

57-
// Aliases for backward compatibility
57+
//! Aliases for backward compatibility
5858
RPC_TRANSACTION_ERROR = RPC_VERIFY_ERROR,
5959
RPC_TRANSACTION_REJECTED = RPC_VERIFY_REJECTED,
6060
RPC_TRANSACTION_ALREADY_IN_CHAIN= RPC_VERIFY_ALREADY_IN_CHAIN,
6161

62-
// P2P client errors
63-
RPC_CLIENT_NOT_CONNECTED = -9, // Bitcoin is not connected
64-
RPC_CLIENT_IN_INITIAL_DOWNLOAD = -10, // Still downloading initial blocks
65-
RPC_CLIENT_NODE_ALREADY_ADDED = -23, // Node is already added
66-
RPC_CLIENT_NODE_NOT_ADDED = -24, // Node has not been added before
62+
//! P2P client errors
63+
RPC_CLIENT_NOT_CONNECTED = -9, //! Bitcoin is not connected
64+
RPC_CLIENT_IN_INITIAL_DOWNLOAD = -10, //! Still downloading initial blocks
65+
RPC_CLIENT_NODE_ALREADY_ADDED = -23, //! Node is already added
66+
RPC_CLIENT_NODE_NOT_ADDED = -24, //! Node has not been added before
6767

68-
// Wallet errors
69-
RPC_WALLET_ERROR = -4, // Unspecified problem with wallet (key not found etc.)
70-
RPC_WALLET_INSUFFICIENT_FUNDS = -6, // Not enough funds in wallet or account
71-
RPC_WALLET_INVALID_ACCOUNT_NAME = -11, // Invalid account name
72-
RPC_WALLET_KEYPOOL_RAN_OUT = -12, // Keypool ran out, call keypoolrefill first
73-
RPC_WALLET_UNLOCK_NEEDED = -13, // Enter the wallet passphrase with walletpassphrase first
74-
RPC_WALLET_PASSPHRASE_INCORRECT = -14, // The wallet passphrase entered was incorrect
75-
RPC_WALLET_WRONG_ENC_STATE = -15, // Command given in wrong wallet encryption state (encrypting an encrypted wallet etc.)
76-
RPC_WALLET_ENCRYPTION_FAILED = -16, // Failed to encrypt the wallet
77-
RPC_WALLET_ALREADY_UNLOCKED = -17, // Wallet is already unlocked
68+
//! Wallet errors
69+
RPC_WALLET_ERROR = -4, //! Unspecified problem with wallet (key not found etc.)
70+
RPC_WALLET_INSUFFICIENT_FUNDS = -6, //! Not enough funds in wallet or account
71+
RPC_WALLET_INVALID_ACCOUNT_NAME = -11, //! Invalid account name
72+
RPC_WALLET_KEYPOOL_RAN_OUT = -12, //! Keypool ran out, call keypoolrefill first
73+
RPC_WALLET_UNLOCK_NEEDED = -13, //! Enter the wallet passphrase with walletpassphrase first
74+
RPC_WALLET_PASSPHRASE_INCORRECT = -14, //! The wallet passphrase entered was incorrect
75+
RPC_WALLET_WRONG_ENC_STATE = -15, //! Command given in wrong wallet encryption state (encrypting an encrypted wallet etc.)
76+
RPC_WALLET_ENCRYPTION_FAILED = -16, //! Failed to encrypt the wallet
77+
RPC_WALLET_ALREADY_UNLOCKED = -17, //! Wallet is already unlocked
7878
};
7979

80-
//
81-
// IOStream device that speaks SSL but can also speak non-SSL
82-
//
80+
/**
81+
* IOStream device that speaks SSL but can also speak non-SSL
82+
*/
8383
template <typename Protocol>
8484
class SSLIOStreamDevice : public boost::iostreams::device<boost::iostreams::bidirectional> {
8585
public:

src/rpcrawtransaction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright (c) 2010 Satoshi Nakamoto
22
// Copyright (c) 2009-2014 The Bitcoin developers
3-
// Distributed under the MIT/X11 software license, see the accompanying
3+
// Distributed under the MIT software license, see the accompanying
44
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
55

66
#include "base58.h"

0 commit comments

Comments
 (0)