Skip to content

Commit 5e0c0fd

Browse files
committed
Merge #15254: Trivial: fixup a few doxygen comments
70e7cee Trivial: Doxygenize existing CBufferedFile and VectorReader comments (Ben Woosley) 9431e1b 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
2 parents b78f6c6 + 70e7cee commit 5e0c0fd

File tree

5 files changed

+40
-40
lines changed

5 files changed

+40
-40
lines changed

src/coins.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -298,17 +298,17 @@ class CCoinsViewCache : public CCoinsViewBacked
298298
};
299299

300300
//! Utility function to add all of a transaction's outputs to a cache.
301-
// When check is false, this assumes that overwrites are only possible for coinbase transactions.
302-
// When check is true, the underlying view may be queried to determine whether an addition is
303-
// an overwrite.
301+
//! When check is false, this assumes that overwrites are only possible for coinbase transactions.
302+
//! When check is true, the underlying view may be queried to determine whether an addition is
303+
//! an overwrite.
304304
// TODO: pass in a boolean to limit these possible overwrites to known
305305
// (pre-BIP34) cases.
306306
void AddCoins(CCoinsViewCache& cache, const CTransaction& tx, int nHeight, bool check = false);
307307

308308
//! Utility function to find any unspent output with a given txid.
309-
// This function can be quite expensive because in the event of a transaction
310-
// which is not found in the cache, it can cause up to MAX_OUTPUTS_PER_BLOCK
311-
// lookups to database, so it should be used with care.
309+
//! This function can be quite expensive because in the event of a transaction
310+
//! which is not found in the cache, it can cause up to MAX_OUTPUTS_PER_BLOCK
311+
//! lookups to database, so it should be used with care.
312312
const Coin& AccessByTxid(const CCoinsViewCache& cache, const uint256& txid);
313313

314314
#endif // BITCOIN_COINS_H

src/net.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -273,17 +273,17 @@ class CConnman
273273
void SetMaxOutboundTimeframe(uint64_t timeframe);
274274
uint64_t GetMaxOutboundTimeframe();
275275

276-
//!check if the outbound target is reached
277-
// if param historicalBlockServingLimit is set true, the function will
278-
// response true if the limit for serving historical blocks has been reached
276+
//! check if the outbound target is reached
277+
//! if param historicalBlockServingLimit is set true, the function will
278+
//! response true if the limit for serving historical blocks has been reached
279279
bool OutboundTargetReached(bool historicalBlockServingLimit);
280280

281-
//!response the bytes left in the current max outbound cycle
282-
// in case of no limit, it will always response 0
281+
//! response the bytes left in the current max outbound cycle
282+
//! in case of no limit, it will always response 0
283283
uint64_t GetOutboundTargetBytesLeft();
284284

285-
//!response the time in second left in the current max outbound cycle
286-
// in case of no limit, it will always response 0
285+
//! response the time in second left in the current max outbound cycle
286+
//! in case of no limit, it will always response 0
287287
uint64_t GetMaxOutboundTimeLeftInCycle();
288288

289289
uint64_t GetTotalBytesRecv();

src/streams.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ class VectorReader
139139

140140
public:
141141

142-
/*
142+
/**
143143
* @param[in] type Serialization Type
144144
* @param[in] version Serialization Version (including any flags)
145145
* @param[in] data Referenced byte vector to overwrite/append
@@ -153,7 +153,7 @@ class VectorReader
153153
}
154154
}
155155

156-
/*
156+
/**
157157
* (other params same as above)
158158
* @param[in] args A list of items to deserialize starting at pos.
159159
*/
@@ -715,15 +715,15 @@ class CBufferedFile
715715
const int nType;
716716
const int nVersion;
717717

718-
FILE *src; // source file
719-
uint64_t nSrcPos; // how many bytes have been read from source
720-
uint64_t nReadPos; // how many bytes have been read from this
721-
uint64_t nReadLimit; // up to which position we're allowed to read
722-
uint64_t nRewind; // how many bytes we guarantee to rewind
723-
std::vector<char> vchBuf; // the buffer
718+
FILE *src; //!< source file
719+
uint64_t nSrcPos; //!< how many bytes have been read from source
720+
uint64_t nReadPos; //!< how many bytes have been read from this
721+
uint64_t nReadLimit; //!< up to which position we're allowed to read
722+
uint64_t nRewind; //!< how many bytes we guarantee to rewind
723+
std::vector<char> vchBuf; //!< the buffer
724724

725725
protected:
726-
// read data from the source to fill the buffer
726+
//! read data from the source to fill the buffer
727727
bool Fill() {
728728
unsigned int pos = nSrcPos % vchBuf.size();
729729
unsigned int readNow = vchBuf.size() - pos;
@@ -768,12 +768,12 @@ class CBufferedFile
768768
}
769769
}
770770

771-
// check whether we're at the end of the source file
771+
//! check whether we're at the end of the source file
772772
bool eof() const {
773773
return nReadPos == nSrcPos && feof(src);
774774
}
775775

776-
// read a number of bytes
776+
//! read a number of bytes
777777
void read(char *pch, size_t nSize) {
778778
if (nSize + nReadPos > nReadLimit)
779779
throw std::ios_base::failure("Read attempted past buffer limit");
@@ -795,12 +795,12 @@ class CBufferedFile
795795
}
796796
}
797797

798-
// return the current reading position
798+
//! return the current reading position
799799
uint64_t GetPos() const {
800800
return nReadPos;
801801
}
802802

803-
// rewind to a given reading position
803+
//! rewind to a given reading position
804804
bool SetPos(uint64_t nPos) {
805805
nReadPos = nPos;
806806
if (nReadPos + nRewind < nSrcPos) {
@@ -826,8 +826,8 @@ class CBufferedFile
826826
return true;
827827
}
828828

829-
// prevent reading beyond a certain position
830-
// no argument removes the limit
829+
//! prevent reading beyond a certain position
830+
//! no argument removes the limit
831831
bool SetLimit(uint64_t nPos = std::numeric_limits<uint64_t>::max()) {
832832
if (nPos < nReadPos)
833833
return false;
@@ -842,7 +842,7 @@ class CBufferedFile
842842
return (*this);
843843
}
844844

845-
// search for a given byte in the stream, and remain positioned on it
845+
//! search for a given byte in the stream, and remain positioned on it
846846
void FindByte(char ch) {
847847
while (true) {
848848
if (nReadPos == nSrcPos)

src/wallet/rpcdump.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -849,9 +849,9 @@ struct ImportData
849849

850850
enum class ScriptContext
851851
{
852-
TOP, //! Top-level scriptPubKey
853-
P2SH, //! P2SH redeemScript
854-
WITNESS_V0, //! P2WSH witnessScript
852+
TOP, //!< Top-level scriptPubKey
853+
P2SH, //!< P2SH redeemScript
854+
WITNESS_V0, //!< P2WSH witnessScript
855855
};
856856

857857
// 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.

src/wallet/wallet.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
#include <vector>
3636

3737
//! Responsible for reading and validating the -wallet arguments and verifying the wallet database.
38-
// This function will perform salvage on the wallet if requested, as long as only one wallet is
39-
// being loaded (WalletParameterInteraction forbids -salvagewallet, -zapwallettxes or -upgradewallet with multiwallet).
38+
//! This function will perform salvage on the wallet if requested, as long as only one wallet is
39+
//! being loaded (WalletParameterInteraction forbids -salvagewallet, -zapwallettxes or -upgradewallet with multiwallet).
4040
bool VerifyWallets(interfaces::Chain& chain, const std::vector<std::string>& wallet_files);
4141

4242
//! Load wallet databases.
@@ -55,10 +55,10 @@ void StopWallets();
5555
void UnloadWallets();
5656

5757
//! Explicitly unload and delete the wallet.
58-
// Blocks the current thread after signaling the unload intent so that all
59-
// wallet clients release the wallet.
60-
// Note that, when blocking is not required, the wallet is implicitly unloaded
61-
// by the shared pointer deleter.
58+
//! Blocks the current thread after signaling the unload intent so that all
59+
//! wallet clients release the wallet.
60+
//! Note that, when blocking is not required, the wallet is implicitly unloaded
61+
//! by the shared pointer deleter.
6262
void UnloadWallet(std::shared_ptr<CWallet>&& wallet);
6363

6464
bool AddWallet(const std::shared_ptr<CWallet>& wallet);
@@ -588,8 +588,8 @@ class CWalletKey
588588
int64_t nTimeCreated;
589589
int64_t nTimeExpires;
590590
std::string strComment;
591-
//! todo: add something to note what created it (user, getnewaddress, change)
592-
//! maybe should have a map<string, string> property map
591+
// todo: add something to note what created it (user, getnewaddress, change)
592+
// maybe should have a map<string, string> property map
593593

594594
explicit CWalletKey(int64_t nExpires=0);
595595

0 commit comments

Comments
 (0)