Bitcoin Core  0.18.99
P2P Digital Currency
Macros | Typedefs | Functions
interpreter.cpp File Reference
#include <script/interpreter.h>
#include <crypto/ripemd160.h>
#include <crypto/sha1.h>
#include <crypto/sha256.h>
#include <pubkey.h>
#include <script/script.h>
#include <uint256.h>
Include dependency graph for interpreter.cpp:

Go to the source code of this file.

Macros

#define stacktop(i)   (stack.at(stack.size()+(i)))
 Script is a stack machine (like Forth) that evaluates a predicate returning a bool indicating valid or not. More...
 
#define altstacktop(i)   (altstack.at(altstack.size()+(i)))
 

Typedefs

typedef std::vector< unsigned char > valtype
 

Functions

bool CastToBool (const valtype &vch)
 
bool CheckSignatureEncoding (const std::vector< unsigned char > &vchSig, unsigned int flags, ScriptError *serror)
 
int FindAndDelete (CScript &script, const CScript &b)
 
bool EvalScript (std::vector< std::vector< unsigned char > > &stack, const CScript &script, unsigned int flags, const BaseSignatureChecker &checker, SigVersion sigversion, ScriptError *serror)
 
template<class T >
uint256 SignatureHash (const CScript &scriptCode, const T &txTo, unsigned int nIn, int nHashType, const CAmount &amount, SigVersion sigversion, const PrecomputedTransactionData *cache)
 
bool VerifyScript (const CScript &scriptSig, const CScript &scriptPubKey, const CScriptWitness *witness, unsigned int flags, const BaseSignatureChecker &checker, ScriptError *serror)
 
size_t CountWitnessSigOps (const CScript &scriptSig, const CScript &scriptPubKey, const CScriptWitness *witness, unsigned int flags)
 

Macro Definition Documentation

◆ altstacktop

#define altstacktop (   i)    (altstack.at(altstack.size()+(i)))

Definition at line 55 of file interpreter.cpp.

◆ stacktop

#define stacktop (   i)    (stack.at(stack.size()+(i)))

Script is a stack machine (like Forth) that evaluates a predicate returning a bool indicating valid or not.

There are no loops.

Definition at line 54 of file interpreter.cpp.

Typedef Documentation

◆ valtype

typedef std::vector<unsigned char> valtype

Definition at line 15 of file interpreter.cpp.

Function Documentation

◆ CastToBool()

bool CastToBool ( const valtype vch)

Definition at line 35 of file interpreter.cpp.

Here is the caller graph for this function:

◆ CheckSignatureEncoding()

bool CheckSignatureEncoding ( const std::vector< unsigned char > &  vchSig,
unsigned int  flags,
ScriptError serror 
)

Definition at line 200 of file interpreter.cpp.

Here is the caller graph for this function:

◆ CountWitnessSigOps()

size_t CountWitnessSigOps ( const CScript scriptSig,
const CScript scriptPubKey,
const CScriptWitness witness,
unsigned int  flags 
)

Definition at line 1607 of file interpreter.cpp.

Here is the call graph for this function:

◆ EvalScript()

bool EvalScript ( std::vector< std::vector< unsigned char > > &  stack,
const CScript script,
unsigned int  flags,
const BaseSignatureChecker checker,
SigVersion  sigversion,
ScriptError serror 
)

Definition at line 281 of file interpreter.cpp.

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

◆ FindAndDelete()

int FindAndDelete ( CScript script,
const CScript b 
)

Definition at line 253 of file interpreter.cpp.

Here is the call graph for this function:

◆ SignatureHash()

template<class T >
uint256 SignatureHash ( const CScript scriptCode,
const T &  txTo,
unsigned int  nIn,
int  nHashType,
const CAmount amount,
SigVersion  sigversion,
const PrecomputedTransactionData cache 
)

Definition at line 1234 of file interpreter.cpp.

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

◆ VerifyScript()

bool VerifyScript ( const CScript scriptSig,
const CScript scriptPubKey,
const CScriptWitness witness,
unsigned int  flags,
const BaseSignatureChecker checker,
ScriptError serror 
)

Definition at line 1472 of file interpreter.cpp.

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