diff --git a/src/coins.h b/src/coins.h --- a/src/coins.h +++ b/src/coins.h @@ -297,19 +297,18 @@ }; //! 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 true, the underlying view may be queried to determine whether -// an addition is an overwrite. +//! 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 an overwrite. // TODO: pass in a boolean to limit these possible overwrites to known // (pre-BIP34) cases. void AddCoins(CCoinsViewCache &cache, const CTransaction &tx, int nHeight, bool check = false); //! Utility function to find any unspent output with a given txid. -// 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 -// lookups to database, so it should be used with care. +//! 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 +//! lookups to database, so it should be used with care. const Coin &AccessByTxid(const CCoinsViewCache &cache, const TxId &txid); #endif // BITCOIN_COINS_H diff --git a/src/net.h b/src/net.h --- a/src/net.h +++ b/src/net.h @@ -307,18 +307,17 @@ void SetMaxOutboundTimeframe(uint64_t timeframe); uint64_t GetMaxOutboundTimeframe(); - //! check if the outbound target is reached. - // If param historicalBlockServingLimit is set true, the function will - // response true if the limit for serving historical blocks has been - // reached. + //! check if the outbound target is reached. If param + //! historicalBlockServingLimit is set true, the function will response true + //! if the limit for serving historical blocks has been reached. bool OutboundTargetReached(bool historicalBlockServingLimit); - //! response the bytes left in the current max outbound cycle - // in case of no limit, it will always response 0 + //! response the bytes left in the current max outbound cycle in case of no + //! limit, it will always response 0 uint64_t GetOutboundTargetBytesLeft(); - //! response the time in second left in the current max outbound cycle - // in case of no limit, it will always response 0 + //! response the time in second left in the current max outbound cycle in + //! case of no limit, it will always response 0 uint64_t GetMaxOutboundTimeLeftInCycle(); uint64_t GetTotalBytesRecv(); diff --git a/src/streams.h b/src/streams.h --- a/src/streams.h +++ b/src/streams.h @@ -706,21 +706,21 @@ const int nType; const int nVersion; - // source file + //! source file FILE *src; - // how many bytes have been read from source + //! how many bytes have been read from source uint64_t nSrcPos; - // how many bytes have been read from this + //! how many bytes have been read from this uint64_t nReadPos; - // up to which position we're allowed to read + //! up to which position we're allowed to read uint64_t nReadLimit; - // how many bytes we guarantee to rewind + //! how many bytes we guarantee to rewind uint64_t nRewind; - // the buffer + //! the buffer std::vector vchBuf; protected: - // read data from the source to fill the buffer + //! read data from the source to fill the buffer bool Fill() { unsigned int pos = nSrcPos % vchBuf.size(); unsigned int readNow = vchBuf.size() - pos; @@ -767,10 +767,10 @@ } } - // 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 { return nReadPos == nSrcPos && feof(src); } - // read a number of bytes + //! read a number of bytes void read(char *pch, size_t nSize) { if (nSize + nReadPos > nReadLimit) { throw std::ios_base::failure("Read attempted past buffer limit"); @@ -797,10 +797,10 @@ } } - // return the current reading position + //! return the current reading position uint64_t GetPos() const { return nReadPos; } - // rewind to a given reading position + //! rewind to a given reading position bool SetPos(uint64_t nPos) { nReadPos = nPos; if (nReadPos + nRewind < nSrcPos) { @@ -828,7 +828,8 @@ return true; } - // Prevent reading beyond a certain position. No argument removes the limit. + //! Prevent reading beyond a certain position. No argument removes the + //! limit. bool SetLimit(uint64_t nPos = std::numeric_limits::max()) { if (nPos < nReadPos) { return false; @@ -843,7 +844,7 @@ 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) { while (true) { if (nReadPos == nSrcPos) { diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -38,10 +38,10 @@ #include //! Explicitly unload and delete the wallet. -// Blocks the current thread after signaling the unload intent so that all -// wallet clients release the wallet. -// Note that, when blocking is not required, the wallet is implicitly unloaded -// by the shared pointer deleter. +//! Blocks the current thread after signaling the unload intent so that all +//! wallet clients release the wallet. +//! Note that, when blocking is not required, the wallet is implicitly unloaded +//! by the shared pointer deleter. void UnloadWallet(std::shared_ptr &&wallet); bool AddWallet(const std::shared_ptr &wallet); @@ -712,8 +712,8 @@ int64_t nTimeCreated; int64_t nTimeExpires; std::string strComment; - //! todo: add something to note what created it (user, getnewaddress, - //! change) maybe should have a map property map + // todo: add something to note what created it (user, getnewaddress, + // change) maybe should have a map property map explicit CWalletKey(int64_t nExpires = 0);