Bitcoin ABC 0.30.5
P2P Digital Currency
Classes | Typedefs | Functions
interpreter.h File Reference
#include <primitives/transaction.h>
#include <script/conditionstack.h>
#include <script/script.h>
#include <script/script_error.h>
#include <script/script_flags.h>
#include <script/script_metrics.h>
#include <script/sighashtype.h>
#include <cstdint>
#include <vector>
Include dependency graph for interpreter.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  BaseSignatureChecker
 
class  GenericTransactionSignatureChecker< T >
 
class  ScriptInterpreter
 

Typedefs

using TransactionSignatureChecker = GenericTransactionSignatureChecker< CTransaction >
 
using MutableTransactionSignatureChecker = GenericTransactionSignatureChecker< CMutableTransaction >
 

Functions

bool CastToBool (const std::vector< uint8_t > &vch)
 
template<class T >
uint256 SignatureHash (const CScript &scriptCode, const T &txTo, unsigned int nIn, SigHashType sigHashType, const Amount amount, const PrecomputedTransactionData *cache=nullptr, uint32_t flags=SCRIPT_ENABLE_SIGHASH_FORKID)
 
bool EvalScript (std::vector< std::vector< uint8_t > > &stack, const CScript &script, uint32_t flags, const BaseSignatureChecker &checker, ScriptExecutionMetrics &metrics, ScriptError *error=nullptr)
 
static bool EvalScript (std::vector< std::vector< uint8_t > > &stack, const CScript &script, uint32_t flags, const BaseSignatureChecker &checker, ScriptError *error=nullptr)
 
bool VerifyScript (const CScript &scriptSig, const CScript &scriptPubKey, uint32_t flags, const BaseSignatureChecker &checker, ScriptExecutionMetrics &metricsOut, ScriptError *serror=nullptr)
 Execute an unlocking and locking script together. More...
 
static bool VerifyScript (const CScript &scriptSig, const CScript &scriptPubKey, uint32_t flags, const BaseSignatureChecker &checker, ScriptError *serror=nullptr)
 
int FindAndDelete (CScript &script, const CScript &b)
 

Typedef Documentation

◆ MutableTransactionSignatureChecker

Definition at line 85 of file interpreter.h.

◆ TransactionSignatureChecker

Definition at line 83 of file interpreter.h.

Function Documentation

◆ CastToBool()

bool CastToBool ( const std::vector< uint8_t > &  vch)

Definition at line 19 of file interpreter.cpp.

Here is the caller graph for this function:

◆ EvalScript() [1/2]

static bool EvalScript ( std::vector< std::vector< uint8_t > > &  stack,
const CScript script,
uint32_t  flags,
const BaseSignatureChecker checker,
ScriptError error = nullptr 
)
inlinestatic

Definition at line 169 of file interpreter.h.

Here is the call graph for this function:

◆ EvalScript() [2/2]

bool EvalScript ( std::vector< std::vector< uint8_t > > &  stack,
const CScript script,
uint32_t  flags,
const BaseSignatureChecker checker,
ScriptExecutionMetrics metrics,
ScriptError error = nullptr 
)

Definition at line 1345 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 45 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,
SigHashType  sigHashType,
const Amount  amount,
const PrecomputedTransactionData cache = nullptr,
uint32_t  flags = SCRIPT_ENABLE_SIGHASH_FORKID 
)

Definition at line 1509 of file interpreter.cpp.

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

◆ VerifyScript() [1/2]

static bool VerifyScript ( const CScript scriptSig,
const CScript scriptPubKey,
uint32_t  flags,
const BaseSignatureChecker checker,
ScriptError serror = nullptr 
)
inlinestatic

Definition at line 187 of file interpreter.h.

Here is the call graph for this function:

◆ VerifyScript() [2/2]

bool VerifyScript ( const CScript scriptSig,
const CScript scriptPubKey,
uint32_t  flags,
const BaseSignatureChecker checker,
ScriptExecutionMetrics metricsOut,
ScriptError serror = nullptr 
)

Execute an unlocking and locking script together.

Upon success, metrics will hold the accumulated script metrics. (upon failure, the results should not be relied on)

Definition at line 1720 of file interpreter.cpp.

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