Bitcoin ABC 0.32.4
P2P Digital Currency
Classes | Typedefs | Functions
interpreter.h File Reference
#include <hash.h>
#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 <optional>
#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  SigHashCache
 Data structure to cache SHA256 midstates for the ECDSA sighash calculations (bare, P2SH) More...
 
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, SigHashCache *sighash_cache=nullptr)
 
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 126 of file interpreter.h.

◆ TransactionSignatureChecker

Definition at line 124 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 216 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 1372 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:
Here is the caller 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,
SigHashCache sighash_cache = nullptr 
)

Definition at line 1560 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 234 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 1785 of file interpreter.cpp.

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