Bitcoin Core  0.15.99
P2P Digital Currency
Public Member Functions | Private Attributes | List of all members
CAffectedKeysVisitor Class Reference

A class to identify which pubkeys a script and a keystore have in common. More...

Inheritance diagram for CAffectedKeysVisitor:
[legend]
Collaboration diagram for CAffectedKeysVisitor:
[legend]

Public Member Functions

 CAffectedKeysVisitor (const CKeyStore &keystoreIn, std::vector< CKeyID > &vKeysIn)
 
void Process (const CScript &script)
 Apply the visitor to each destination in a script, recursively to the redeemscript in the case of p2sh destinations. More...
 
void operator() (const CKeyID &keyId)
 
void operator() (const CScriptID &scriptId)
 
void operator() (const WitnessV0ScriptHash &scriptID)
 
void operator() (const WitnessV0KeyHash &keyid)
 
template<typename X >
void operator() (const X &none)
 

Private Attributes

const CKeyStorekeystore
 
std::vector< CKeyID > & vKeys
 

Detailed Description

A class to identify which pubkeys a script and a keystore have in common.

Definition at line 108 of file wallet.cpp.

Constructor & Destructor Documentation

◆ CAffectedKeysVisitor()

CAffectedKeysVisitor::CAffectedKeysVisitor ( const CKeyStore keystoreIn,
std::vector< CKeyID > &  vKeysIn 
)
inline
Parameters
[in]keystoreInThe CKeyStore that is queried for the presence of a pubkey.
[out]vKeysInA vector to which a script's pubkey identifiers are appended if they are in the keystore.

Definition at line 118 of file wallet.cpp.

Member Function Documentation

◆ operator()() [1/5]

void CAffectedKeysVisitor::operator() ( const CKeyID keyId)
inline

Definition at line 136 of file wallet.cpp.

Here is the call graph for this function:

◆ operator()() [2/5]

void CAffectedKeysVisitor::operator() ( const CScriptID scriptId)
inline

Definition at line 141 of file wallet.cpp.

Here is the call graph for this function:

◆ operator()() [3/5]

void CAffectedKeysVisitor::operator() ( const WitnessV0ScriptHash scriptID)
inline

Definition at line 147 of file wallet.cpp.

Here is the call graph for this function:

◆ operator()() [4/5]

void CAffectedKeysVisitor::operator() ( const WitnessV0KeyHash keyid)
inline

Definition at line 157 of file wallet.cpp.

Here is the call graph for this function:

◆ operator()() [5/5]

template<typename X >
void CAffectedKeysVisitor::operator() ( const X none)
inline

Definition at line 166 of file wallet.cpp.

◆ Process()

void CAffectedKeysVisitor::Process ( const CScript script)
inline

Apply the visitor to each destination in a script, recursively to the redeemscript in the case of p2sh destinations.

Parameters
[in]scriptThe CScript from which destinations are extracted.
Postcondition
Any CKeyIDs that script and keystore have in common are appended to the visitor's vKeys.

Definition at line 126 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ keystore

const CKeyStore& CAffectedKeysVisitor::keystore
private

Definition at line 110 of file wallet.cpp.

◆ vKeys

std::vector<CKeyID>& CAffectedKeysVisitor::vKeys
private

Definition at line 111 of file wallet.cpp.


The documentation for this class was generated from the following file: