mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-17 20:32:33 +02:00
Merge #15254: Trivial: fixup a few doxygen comments
70e7cee96028889ab709fa3c479225e584fcb77f Trivial: Doxygenize existing CBufferedFile and VectorReader comments (Ben Woosley) 9431e1b91598fc255234ede10c22208ad18685cd Trivial: fixup a few doxygen comments (Ben Woosley) Pull request description: These were not declared properly, so their results are not properly processed. E.g.: https://dev.visucore.com/bitcoin/doxygen/rpcdump_8cpp.html#a994c8748aaa60fbb78009ff8a0638dea https://dev.visucore.com/bitcoin/doxygen/coins_8cpp.html#aa03af24ef3570144b045f4fca7a0d603 https://dev.visucore.com/bitcoin/doxygen/wallet_2wallet_8cpp.html#a5c2a7725ff8796f03471f844ecded3d9 > A third alternative is to use a block of at least two C++ comment lines, where each line starts with an additional slash or an exclamation mark. http://www.doxygen.nl/manual/docblocks.html Tree-SHA512: c13fd48ac78f25e51b1281385747e8be4bd6e27e0a0f8704608aa5c66c16715c639f1cf27018b1bf05fc2eaed6c7b9be05a68365ffe1d88dd3f400d453b7bead
This commit is contained in:
commit
5e0c0fd62f
12
src/coins.h
12
src/coins.h
@ -298,17 +298,17 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
//! Utility function to add all of a transaction's outputs to a cache.
|
//! Utility function to add all of a transaction's outputs to a cache.
|
||||||
// When check is false, this assumes that overwrites are only possible for coinbase transactions.
|
//! When check is false, this assumes that overwrites are only possible for coinbase transactions.
|
||||||
// When check is true, the underlying view may be queried to determine whether an addition is
|
//! When check is true, the underlying view may be queried to determine whether an addition is
|
||||||
// an overwrite.
|
//! an overwrite.
|
||||||
// TODO: pass in a boolean to limit these possible overwrites to known
|
// TODO: pass in a boolean to limit these possible overwrites to known
|
||||||
// (pre-BIP34) cases.
|
// (pre-BIP34) cases.
|
||||||
void AddCoins(CCoinsViewCache& cache, const CTransaction& tx, int nHeight, bool check = false);
|
void AddCoins(CCoinsViewCache& cache, const CTransaction& tx, int nHeight, bool check = false);
|
||||||
|
|
||||||
//! Utility function to find any unspent output with a given txid.
|
//! Utility function to find any unspent output with a given txid.
|
||||||
// This function can be quite expensive because in the event of a transaction
|
//! This function can be quite expensive because in the event of a transaction
|
||||||
// which is not found in the cache, it can cause up to MAX_OUTPUTS_PER_BLOCK
|
//! which is not found in the cache, it can cause up to MAX_OUTPUTS_PER_BLOCK
|
||||||
// lookups to database, so it should be used with care.
|
//! lookups to database, so it should be used with care.
|
||||||
const Coin& AccessByTxid(const CCoinsViewCache& cache, const uint256& txid);
|
const Coin& AccessByTxid(const CCoinsViewCache& cache, const uint256& txid);
|
||||||
|
|
||||||
#endif // BITCOIN_COINS_H
|
#endif // BITCOIN_COINS_H
|
||||||
|
14
src/net.h
14
src/net.h
@ -273,17 +273,17 @@ public:
|
|||||||
void SetMaxOutboundTimeframe(uint64_t timeframe);
|
void SetMaxOutboundTimeframe(uint64_t timeframe);
|
||||||
uint64_t GetMaxOutboundTimeframe();
|
uint64_t GetMaxOutboundTimeframe();
|
||||||
|
|
||||||
//!check if the outbound target is reached
|
//! check if the outbound target is reached
|
||||||
// if param historicalBlockServingLimit is set true, the function will
|
//! if param historicalBlockServingLimit is set true, the function will
|
||||||
// response true if the limit for serving historical blocks has been reached
|
//! response true if the limit for serving historical blocks has been reached
|
||||||
bool OutboundTargetReached(bool historicalBlockServingLimit);
|
bool OutboundTargetReached(bool historicalBlockServingLimit);
|
||||||
|
|
||||||
//!response the bytes left in the current max outbound cycle
|
//! response the bytes left in the current max outbound cycle
|
||||||
// in case of no limit, it will always response 0
|
//! in case of no limit, it will always response 0
|
||||||
uint64_t GetOutboundTargetBytesLeft();
|
uint64_t GetOutboundTargetBytesLeft();
|
||||||
|
|
||||||
//!response the time in second left in the current max outbound cycle
|
//! response the time in second left in the current max outbound cycle
|
||||||
// in case of no limit, it will always response 0
|
//! in case of no limit, it will always response 0
|
||||||
uint64_t GetMaxOutboundTimeLeftInCycle();
|
uint64_t GetMaxOutboundTimeLeftInCycle();
|
||||||
|
|
||||||
uint64_t GetTotalBytesRecv();
|
uint64_t GetTotalBytesRecv();
|
||||||
|
@ -139,7 +139,7 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* @param[in] type Serialization Type
|
* @param[in] type Serialization Type
|
||||||
* @param[in] version Serialization Version (including any flags)
|
* @param[in] version Serialization Version (including any flags)
|
||||||
* @param[in] data Referenced byte vector to overwrite/append
|
* @param[in] data Referenced byte vector to overwrite/append
|
||||||
@ -153,7 +153,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* (other params same as above)
|
* (other params same as above)
|
||||||
* @param[in] args A list of items to deserialize starting at pos.
|
* @param[in] args A list of items to deserialize starting at pos.
|
||||||
*/
|
*/
|
||||||
@ -715,15 +715,15 @@ private:
|
|||||||
const int nType;
|
const int nType;
|
||||||
const int nVersion;
|
const int nVersion;
|
||||||
|
|
||||||
FILE *src; // source file
|
FILE *src; //!< source file
|
||||||
uint64_t nSrcPos; // how many bytes have been read from source
|
uint64_t nSrcPos; //!< how many bytes have been read from source
|
||||||
uint64_t nReadPos; // how many bytes have been read from this
|
uint64_t nReadPos; //!< how many bytes have been read from this
|
||||||
uint64_t nReadLimit; // up to which position we're allowed to read
|
uint64_t nReadLimit; //!< up to which position we're allowed to read
|
||||||
uint64_t nRewind; // how many bytes we guarantee to rewind
|
uint64_t nRewind; //!< how many bytes we guarantee to rewind
|
||||||
std::vector<char> vchBuf; // the buffer
|
std::vector<char> vchBuf; //!< the buffer
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// read data from the source to fill the buffer
|
//! read data from the source to fill the buffer
|
||||||
bool Fill() {
|
bool Fill() {
|
||||||
unsigned int pos = nSrcPos % vchBuf.size();
|
unsigned int pos = nSrcPos % vchBuf.size();
|
||||||
unsigned int readNow = vchBuf.size() - pos;
|
unsigned int readNow = vchBuf.size() - pos;
|
||||||
@ -768,12 +768,12 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check whether we're at the end of the source file
|
//! check whether we're at the end of the source file
|
||||||
bool eof() const {
|
bool eof() const {
|
||||||
return nReadPos == nSrcPos && feof(src);
|
return nReadPos == nSrcPos && feof(src);
|
||||||
}
|
}
|
||||||
|
|
||||||
// read a number of bytes
|
//! read a number of bytes
|
||||||
void read(char *pch, size_t nSize) {
|
void read(char *pch, size_t nSize) {
|
||||||
if (nSize + nReadPos > nReadLimit)
|
if (nSize + nReadPos > nReadLimit)
|
||||||
throw std::ios_base::failure("Read attempted past buffer limit");
|
throw std::ios_base::failure("Read attempted past buffer limit");
|
||||||
@ -795,12 +795,12 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// return the current reading position
|
//! return the current reading position
|
||||||
uint64_t GetPos() const {
|
uint64_t GetPos() const {
|
||||||
return nReadPos;
|
return nReadPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
// rewind to a given reading position
|
//! rewind to a given reading position
|
||||||
bool SetPos(uint64_t nPos) {
|
bool SetPos(uint64_t nPos) {
|
||||||
nReadPos = nPos;
|
nReadPos = nPos;
|
||||||
if (nReadPos + nRewind < nSrcPos) {
|
if (nReadPos + nRewind < nSrcPos) {
|
||||||
@ -826,8 +826,8 @@ public:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// prevent reading beyond a certain position
|
//! prevent reading beyond a certain position
|
||||||
// no argument removes the limit
|
//! no argument removes the limit
|
||||||
bool SetLimit(uint64_t nPos = std::numeric_limits<uint64_t>::max()) {
|
bool SetLimit(uint64_t nPos = std::numeric_limits<uint64_t>::max()) {
|
||||||
if (nPos < nReadPos)
|
if (nPos < nReadPos)
|
||||||
return false;
|
return false;
|
||||||
@ -842,7 +842,7 @@ public:
|
|||||||
return (*this);
|
return (*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// search for a given byte in the stream, and remain positioned on it
|
//! search for a given byte in the stream, and remain positioned on it
|
||||||
void FindByte(char ch) {
|
void FindByte(char ch) {
|
||||||
while (true) {
|
while (true) {
|
||||||
if (nReadPos == nSrcPos)
|
if (nReadPos == nSrcPos)
|
||||||
|
@ -849,9 +849,9 @@ struct ImportData
|
|||||||
|
|
||||||
enum class ScriptContext
|
enum class ScriptContext
|
||||||
{
|
{
|
||||||
TOP, //! Top-level scriptPubKey
|
TOP, //!< Top-level scriptPubKey
|
||||||
P2SH, //! P2SH redeemScript
|
P2SH, //!< P2SH redeemScript
|
||||||
WITNESS_V0, //! P2WSH witnessScript
|
WITNESS_V0, //!< P2WSH witnessScript
|
||||||
};
|
};
|
||||||
|
|
||||||
// Analyse the provided scriptPubKey, determining which keys and which redeem scripts from the ImportData struct are needed to spend it, and mark them as used.
|
// Analyse the provided scriptPubKey, determining which keys and which redeem scripts from the ImportData struct are needed to spend it, and mark them as used.
|
||||||
|
@ -35,8 +35,8 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
//! Responsible for reading and validating the -wallet arguments and verifying the wallet database.
|
//! Responsible for reading and validating the -wallet arguments and verifying the wallet database.
|
||||||
// This function will perform salvage on the wallet if requested, as long as only one wallet is
|
//! This function will perform salvage on the wallet if requested, as long as only one wallet is
|
||||||
// being loaded (WalletParameterInteraction forbids -salvagewallet, -zapwallettxes or -upgradewallet with multiwallet).
|
//! being loaded (WalletParameterInteraction forbids -salvagewallet, -zapwallettxes or -upgradewallet with multiwallet).
|
||||||
bool VerifyWallets(interfaces::Chain& chain, const std::vector<std::string>& wallet_files);
|
bool VerifyWallets(interfaces::Chain& chain, const std::vector<std::string>& wallet_files);
|
||||||
|
|
||||||
//! Load wallet databases.
|
//! Load wallet databases.
|
||||||
@ -55,10 +55,10 @@ void StopWallets();
|
|||||||
void UnloadWallets();
|
void UnloadWallets();
|
||||||
|
|
||||||
//! Explicitly unload and delete the wallet.
|
//! Explicitly unload and delete the wallet.
|
||||||
// Blocks the current thread after signaling the unload intent so that all
|
//! Blocks the current thread after signaling the unload intent so that all
|
||||||
// wallet clients release the wallet.
|
//! wallet clients release the wallet.
|
||||||
// Note that, when blocking is not required, the wallet is implicitly unloaded
|
//! Note that, when blocking is not required, the wallet is implicitly unloaded
|
||||||
// by the shared pointer deleter.
|
//! by the shared pointer deleter.
|
||||||
void UnloadWallet(std::shared_ptr<CWallet>&& wallet);
|
void UnloadWallet(std::shared_ptr<CWallet>&& wallet);
|
||||||
|
|
||||||
bool AddWallet(const std::shared_ptr<CWallet>& wallet);
|
bool AddWallet(const std::shared_ptr<CWallet>& wallet);
|
||||||
@ -588,8 +588,8 @@ public:
|
|||||||
int64_t nTimeCreated;
|
int64_t nTimeCreated;
|
||||||
int64_t nTimeExpires;
|
int64_t nTimeExpires;
|
||||||
std::string strComment;
|
std::string strComment;
|
||||||
//! todo: add something to note what created it (user, getnewaddress, change)
|
// todo: add something to note what created it (user, getnewaddress, change)
|
||||||
//! maybe should have a map<string, string> property map
|
// maybe should have a map<string, string> property map
|
||||||
|
|
||||||
explicit CWalletKey(int64_t nExpires=0);
|
explicit CWalletKey(int64_t nExpires=0);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user