Bitcoin ABC
0.29.4
P2P Digital Currency
|
#include <script/interpreter.h>
#include <crypto/ripemd160.h>
#include <crypto/sha1.h>
#include <crypto/sha256.h>
#include <pubkey.h>
#include <script/bitfield.h>
#include <script/script.h>
#include <script/sigencoding.h>
#include <uint256.h>
#include <util/bitmanip.h>
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))) |
Functions | |
bool | CastToBool (const valtype &vch) |
static void | popstack (std::vector< valtype > &stack) |
int | FindAndDelete (CScript &script, const CScript &b) |
static void | CleanupScriptCode (CScript &scriptCode, const std::vector< uint8_t > &vchSig, uint32_t flags) |
static bool | IsOpcodeDisabled (opcodetype opcode, uint32_t flags) |
static bool | EvalChecksig (const valtype &vchSig, const valtype &vchPubKey, CScript::const_iterator pbegincodehash, CScript::const_iterator pend, uint32_t flags, const BaseSignatureChecker &checker, ScriptExecutionMetrics &metrics, ScriptError *serror, bool &fSuccess) |
Helper for OP_CHECKSIG and OP_CHECKSIGVERIFY. More... | |
bool | EvalScript (std::vector< valtype > &stack, const CScript &script, uint32_t flags, const BaseSignatureChecker &checker, ScriptExecutionMetrics &metrics, ScriptError *serror) |
template<class T > | |
uint256 | SignatureHash (const CScript &scriptCode, const T &txTo, unsigned int nIn, SigHashType sigHashType, const Amount amount, const PrecomputedTransactionData *cache, uint32_t flags) |
bool | VerifyScript (const CScript &scriptSig, const CScript &scriptPubKey, uint32_t flags, const BaseSignatureChecker &checker, ScriptExecutionMetrics &metricsOut, ScriptError *serror) |
Execute an unlocking and locking script together. More... | |
#define altstacktop | ( | i | ) | (altstack.at(altstack.size() + (i))) |
Definition at line 37 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 36 of file interpreter.cpp.
bool CastToBool | ( | const valtype & | vch | ) |
|
static |
Definition at line 73 of file interpreter.cpp.
|
static |
Helper for OP_CHECKSIG and OP_CHECKSIGVERIFY.
A return value of false means the script fails entirely. When true is returned, the fSuccess variable indicates whether the signature check itself succeeded.
Definition at line 173 of file interpreter.cpp.
bool EvalScript | ( | std::vector< valtype > & | stack, |
const CScript & | script, | ||
uint32_t | flags, | ||
const BaseSignatureChecker & | checker, | ||
ScriptExecutionMetrics & | metrics, | ||
ScriptError * | serror | ||
) |
Definition at line 203 of file interpreter.cpp.
Definition at line 45 of file interpreter.cpp.
|
static |
|
inlinestatic |
uint256 SignatureHash | ( | const CScript & | scriptCode, |
const T & | txTo, | ||
unsigned int | nIn, | ||
SigHashType | sigHashType, | ||
const Amount | amount, | ||
const PrecomputedTransactionData * | cache, | ||
uint32_t | flags | ||
) |
Definition at line 1566 of file interpreter.cpp.
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 1777 of file interpreter.cpp.