Skip to content

Commit 3339d84

Browse files
committed
[trivial] add doxygen-compatible comments to CAffectedKeysVisitor
1 parent 1ef57a9 commit 3339d84

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/wallet/wallet.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,25 @@ std::string COutput::ToString() const
102102
return strprintf("COutput(%s, %d, %d) [%s]", tx->GetHash().ToString(), i, nDepth, FormatMoney(tx->tx->vout[i].nValue));
103103
}
104104

105+
/** A class to identify which pubkeys a script and a keystore have in common. */
105106
class CAffectedKeysVisitor : public boost::static_visitor<void> {
106107
private:
107108
const CKeyStore &keystore;
108109
std::vector<CKeyID> &vKeys;
109110

110111
public:
112+
/**
113+
* @param[in] keystoreIn The CKeyStore that is queried for the presence of a pubkey.
114+
* @param[out] vKeysIn A vector to which a script's pubkey identifiers are appended if they are in the keystore.
115+
*/
111116
CAffectedKeysVisitor(const CKeyStore &keystoreIn, std::vector<CKeyID> &vKeysIn) : keystore(keystoreIn), vKeys(vKeysIn) {}
112117

118+
/**
119+
* Apply the visitor to each destination in a script, recursively to the redeemscript
120+
* in the case of p2sh destinations.
121+
* @param[in] script The CScript from which destinations are extracted.
122+
* @post Any CKeyIDs that script and keystore have in common are appended to the visitor's vKeys.
123+
*/
113124
void Process(const CScript &script) {
114125
txnouttype type;
115126
std::vector<CTxDestination> vDest;

0 commit comments

Comments
 (0)