Skip to content

Commit

Permalink
Begin doxygen-compatible comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sipa committed Mar 26, 2012
1 parent 01a196e commit 6b8de05
Show file tree
Hide file tree
Showing 18 changed files with 136 additions and 134 deletions.
3 changes: 2 additions & 1 deletion src/addrman.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <openssl/rand.h>


// Extended statistics about a CAddress
/** Extended statistics about a CAddress */
class CAddrInfo : public CAddress
{
private:
Expand Down Expand Up @@ -160,6 +160,7 @@ class CAddrInfo : public CAddress
// the maximum number of nodes to return in a getaddr call
#define ADDRMAN_GETADDR_MAX 2500

/** Stochastical (IP) address manager */
class CAddrMan
{
private:
Expand Down
14 changes: 8 additions & 6 deletions src/base58.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ inline bool DecodeBase58Check(const std::string& str, std::vector<unsigned char>



// Base class for all base58-encoded data
/** Base class for all base58-encoded data */
class CBase58Data
{
protected:
Expand Down Expand Up @@ -252,11 +252,12 @@ class CBase58Data
bool operator> (const CBase58Data& b58) const { return CompareTo(b58) > 0; }
};

// base58-encoded bitcoin addresses
// Public-key-hash-addresses have version 0 (or 192 testnet)
// The data vector contains RIPEMD160(SHA256(pubkey)), where pubkey is the serialized public key
// Script-hash-addresses have version 5 (or 196 testnet)
// The data vector contains RIPEMD160(SHA256(cscript)), where cscript is the serialized redemption script
/** base58-encoded bitcoin addresses.
* Public-key-hash-addresses have version 0 (or 111 testnet).
* The data vector contains RIPEMD160(SHA256(pubkey)), where pubkey is the serialized public key.
* Script-hash-addresses have version 5 (or 196 testnet).
* The data vector contains RIPEMD160(SHA256(cscript)), where cscript is the serialized redemption script.
*/
class CBitcoinAddress : public CBase58Data
{
public:
Expand Down Expand Up @@ -356,6 +357,7 @@ class CBitcoinAddress : public CBase58Data
}
};

/** A base58-encoded secret key */
class CBitcoinSecret : public CBase58Data
{
public:
Expand Down
5 changes: 3 additions & 2 deletions src/bignum.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@

#include "util.h"

/** Errors thrown by the bignum class */
class bignum_error : public std::runtime_error
{
public:
explicit bignum_error(const std::string& str) : std::runtime_error(str) {}
};



/** RAII encapsulated BN_CTX (OpenSSL bignum context) */
class CAutoBN_CTX
{
protected:
Expand Down Expand Up @@ -46,7 +47,7 @@ class CAutoBN_CTX
};



/** C++ wrapper for BIGNUM (OpenSSl bignum) */
class CBigNum : public BIGNUM
{
public:
Expand Down
7 changes: 3 additions & 4 deletions src/checkpoints.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
class uint256;
class CBlockIndex;

//
// Block-chain checkpoints are compiled-in sanity checks.
// They are updated every release or three.
//
/** Block-chain checkpoints are compiled-in sanity checks.
* They are updated every release or three.
*/
namespace Checkpoints
{
// Returns true if block passes checkpoint checks
Expand Down
2 changes: 2 additions & 0 deletions src/crypter.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ with the double-sha256 of the public key as the IV, and the
master key's key as the encryption key (see keystore.[ch]).
*/

/** Master key for wallet encryption */
class CMasterKey
{
public:
Expand Down Expand Up @@ -58,6 +59,7 @@ class CMasterKey

typedef std::vector<unsigned char, secure_allocator<unsigned char> > CKeyingMaterial;

/** Encryption/decryption context with key information */
class CCrypter
{
private:
Expand Down
11 changes: 6 additions & 5 deletions src/db.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ void ThreadFlushWalletDB(void* parg);
bool BackupWallet(const CWallet& wallet, const std::string& strDest);



/** RAII class that provides access to a Berkeley database */
class CDB
{
protected:
Expand Down Expand Up @@ -266,7 +266,7 @@ class CDB




/** Access to the transaction database (blkindex.dat) */
class CTxDB : public CDB
{
public:
Expand Down Expand Up @@ -297,7 +297,7 @@ class CTxDB : public CDB




/** Access to the (IP) address database (addr.dat) */
class CAddrDB : public CDB
{
public:
Expand All @@ -315,7 +315,7 @@ class CAddrDB : public CDB
bool LoadAddresses();



/** A key pool entry */
class CKeyPool
{
public:
Expand Down Expand Up @@ -344,7 +344,7 @@ class CKeyPool




/** Error statuses for the wallet database */
enum DBErrors
{
DB_LOAD_OK,
Expand All @@ -354,6 +354,7 @@ enum DBErrors
DB_NEED_REWRITE
};

/** Access to the wallet database (wallet.dat) */
class CWalletDB : public CDB
{
public:
Expand Down
1 change: 1 addition & 0 deletions src/key.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ typedef std::vector<unsigned char, secure_allocator<unsigned char> > CPrivKey;
// CSecret is a serialization of just the secret parameter (32 bytes)
typedef std::vector<unsigned char, secure_allocator<unsigned char> > CSecret;

/** An encapsulated OpenSSL Elliptic Curve key (public and/or private) */
class CKey
{
protected:
Expand Down
9 changes: 5 additions & 4 deletions src/keystore.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "crypter.h"
#include "script.h"

// A virtual base class for key stores
/** A virtual base class for key stores */
class CKeyStore
{
protected:
Expand Down Expand Up @@ -42,7 +42,7 @@ class CKeyStore
typedef std::map<CBitcoinAddress, std::pair<CSecret, bool> > KeyMap;
typedef std::map<uint160, CScript > ScriptMap;

// Basic key store, that keeps keys in an address->secret map
/** Basic key store, that keeps keys in an address->secret map */
class CBasicKeyStore : public CKeyStore
{
protected:
Expand Down Expand Up @@ -92,8 +92,9 @@ class CBasicKeyStore : public CKeyStore

typedef std::map<CBitcoinAddress, std::pair<std::vector<unsigned char>, std::vector<unsigned char> > > CryptedKeyMap;

// Keystore which keeps the private keys encrypted
// It derives from the basic key store, which is used if no encryption is active.
/** Keystore which keeps the private keys encrypted.
* It derives from the basic key store, which is used if no encryption is active.
*/
class CCryptoKeyStore : public CBasicKeyStore
{
private:
Expand Down
Loading

0 comments on commit 6b8de05

Please sign in to comment.