Fabcoin Core  0.16.2
P2P Digital Currency
Macros | Typedefs | Functions
interpreter.cpp File Reference
#include "interpreter.h"
#include "primitives/transaction.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 IsCompressedOrUncompressedPubKey (const valtype &vchPubKey)
 
bool IsLowDERSignature (const valtype &vchSig, ScriptError *serror, bool haveHashType)
 
bool IsDERSignature (const valtype &vchSig, ScriptError *serror, bool haveHashType)
 
bool CheckSignatureEncoding (const std::vector< unsigned char > &vchSig, unsigned int flags, ScriptError *serror)
 
bool EvalScript (std::vector< std::vector< unsigned char > > &stack, const CScript &script, unsigned int flags, const BaseSignatureChecker &checker, SigVersion sigversion, ScriptError *serror)
 
uint256 SignatureHash (const CScript &scriptCode, const CTransaction &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

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

Definition at line 57 of file interpreter.cpp.

#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 56 of file interpreter.cpp.

Typedef Documentation

typedef std::vector<unsigned char> valtype

Definition at line 16 of file interpreter.cpp.

Function Documentation

bool CastToBool ( const valtype vch)

Definition at line 37 of file interpreter.cpp.

Here is the caller graph for this function:

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

Definition at line 202 of file interpreter.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 1564 of file interpreter.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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 253 of file interpreter.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool IsCompressedOrUncompressedPubKey ( const valtype vchPubKey)

Definition at line 65 of file interpreter.cpp.

Here is the caller graph for this function:

bool IsDERSignature ( const valtype vchSig,
ScriptError serror,
bool  haveHashType 
)

Definition at line 184 of file interpreter.cpp.

Here is the caller graph for this function:

bool IsLowDERSignature ( const valtype vchSig,
ScriptError serror,
bool  haveHashType 
)

Definition at line 174 of file interpreter.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

uint256 SignatureHash ( const CScript scriptCode,
const CTransaction txTo,
unsigned int  nIn,
int  nHashType,
const CAmount amount,
SigVersion  sigversion,
const PrecomputedTransactionData cache 
)

Definition at line 1198 of file interpreter.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 1429 of file interpreter.cpp.

Here is the call graph for this function:

Here is the caller graph for this function: