From 5b40d8868820265adb24fec097905e84edb85762 Mon Sep 17 00:00:00 2001 From: Michael Ford Date: Sun, 26 Oct 2014 15:03:12 +0800 Subject: Update comments in wallet to be doxygen compatible --- src/wallet.cpp | 76 +++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 46 insertions(+), 30 deletions(-) (limited to 'src/wallet.cpp') diff --git a/src/wallet.cpp b/src/wallet.cpp index 3812c22fe2..d392149dbb 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin developers -// Distributed under the MIT/X11 software license, see the accompanying +// Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "wallet.h" @@ -22,18 +22,23 @@ using namespace std; -// Settings +/** + * Settings + */ CFeeRate payTxFee(DEFAULT_TRANSACTION_FEE); unsigned int nTxConfirmTarget = 1; bool bSpendZeroConfChange = true; -/** Fees smaller than this (in satoshi) are considered zero fee (for transaction creation) */ -CFeeRate CWallet::minTxFee = CFeeRate(10000); // Override with -mintxfee +/** + * Fees smaller than this (in satoshi) are considered zero fee (for transaction creation) + * Override with -mintxfee + */ +CFeeRate CWallet::minTxFee = CFeeRate(10000); -////////////////////////////////////////////////////////////////////////////// -// -// mapWallet -// +/** @defgroup mapWallet + * + * @{ + */ struct CompareValueOnly { @@ -367,8 +372,10 @@ void CWallet::SyncMetaData(pair range) } } -// Outpoint is spent if any non-conflicted transaction -// spends it: +/** + * Outpoint is spent if any non-conflicted transaction + * spends it: + */ bool CWallet::IsSpent(const uint256& hash, unsigned int n) const { const COutPoint outpoint(hash, n); @@ -477,7 +484,7 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase) { if (!pwalletdbEncryption->TxnCommit()) { delete pwalletdbEncryption; - // We now have keys encrypted in memory, but no on disk... + // We now have keys encrypted in memory, but not on disk... // die to avoid confusion and let the user reload their unencrypted wallet. assert(false); } @@ -667,9 +674,11 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFromLoadWallet) return true; } -// Add a transaction to the wallet, or update it. -// pblock is optional, but should be provided if the transaction is known to be in a block. -// If fUpdate is true, existing transactions will be updated. +/** + * Add a transaction to the wallet, or update it. + * pblock is optional, but should be provided if the transaction is known to be in a block. + * If fUpdate is true, existing transactions will be updated. + */ bool CWallet::AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pblock, bool fUpdate) { { @@ -911,9 +920,11 @@ bool CWalletTx::WriteToDisk() return CWalletDB(pwallet->strWalletFile).WriteTx(GetHash(), *this); } -// Scan the block chain (starting in pindexStart) for transactions -// from or to us. If fUpdate is true, found transactions that already -// exist in the wallet will be updated. +/** + * Scan the block chain (starting in pindexStart) for transactions + * from or to us. If fUpdate is true, found transactions that already + * exist in the wallet will be updated. + */ int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate) { int ret = 0; @@ -1035,15 +1046,15 @@ void CWallet::ResendWalletTransactions() } } +/** @} */ // end of mapWallet - -////////////////////////////////////////////////////////////////////////////// -// -// Actions -// +/** @defgroup Actions + * + * @{ + */ CAmount CWallet::GetBalance() const @@ -1136,7 +1147,9 @@ CAmount CWallet::GetImmatureWatchOnlyBalance() const return nTotal; } -// populate vCoins with vector of available COutputs. +/** + * populate vCoins with vector of available COutputs. + */ void CWallet::AvailableCoins(vector& vCoins, bool fOnlyConfirmed, const CCoinControl *coinControl) const { vCoins.clear(); @@ -1194,7 +1207,7 @@ static void ApproximateBestSubset(vector& vWtx) setKeyPool.clear(); // Note: can't top-up keypool here, because wallet is locked. // User will be prompted to unlock wallet the next operation - // the requires a new key. + // that requires a new key. } } @@ -1736,10 +1751,10 @@ bool CWallet::SetDefaultKey(const CPubKey &vchPubKey) return true; } -// -// Mark old keypool keys as used, -// and generate all new keys -// +/** + * Mark old keypool keys as used, + * and generate all new keys + */ bool CWallet::NewKeyPool() { { @@ -2120,6 +2135,7 @@ void CWallet::ListLockedCoins(std::vector& vOutpts) } } +/** @} */ // end of Actions class CAffectedKeysVisitor : public boost::static_visitor { private: -- cgit v1.2.3