17 std::vector<std::vector<uint8_t>> stack;
29 std::vector<std::vector<uint8_t>> stackCopy = stack;
40 if (stack.empty() ||
CastToBool(stack.back()) ==
false) {
54 swap(stack, stackCopy);
55 const std::vector<uint8_t> &redeemScriptRaw = stack.back();
56 CScript redeemScript(redeemScriptRaw.begin(), redeemScriptRaw.end());
74 if (stack.empty() ||
CastToBool(stack.back()) ==
false) {
82 if (stack.size() != 1) {
99 bool isPushOnly)
const {
105 while (!interpreter.
IsAtEnd()) {
110 trace.
errorMsg =
"Invalidly encoded opcode";
129 }
catch (std::exception &ex) {
Serialized script, used inside transaction inputs and outputs.
bool IsPushOnly(const_iterator pc) const
Called by IsStandardTx and P2SH/BIP62 VerifyScript (which makes it consensus-critical).
bool IsPayToScriptHash() const
bool IsWitnessProgram(int &version, std::vector< uint8_t > &program) const
An input of a transaction.
IguanaTrace RunScript(ScriptInterpreter &interpreter, bool isPushOnly) const
IguanaResult Run() const
Run the interpreter, stepping through the scripts and return the trace.
MutableTransactionSignatureChecker sigChecker
const std::vector< std::vector< uint8_t > > & GetStack() const
const std::vector< std::vector< uint8_t > > & GetAltStack() const
ScriptError GetScriptError()
bool GetNextOp(opcodetype &opcodeRet, std::vector< uint8_t > &vchRet) const
bool CastToBool(const valtype &vch)
@ SCRIPT_VERIFY_SIGPUSHONLY
@ SCRIPT_VERIFY_CLEANSTACK
@ SCRIPT_DISALLOW_SEGWIT_RECOVERY
@ SCRIPT_VERIFY_INPUT_SIGCHECKS
IguanaTrace traceScriptSig
IguanaTrace traceScriptPubKey
ScriptExecutionMetrics metrics
std::optional< IguanaTrace > traceRedeemScript
std::vector< std::vector< uint8_t > > stack
std::vector< std::vector< uint8_t > > altstack
std::vector< uint8_t > pushdata
std::vector< IguanaTraceEntry > entries
IguanaStacks initialStacks