Changeset View
Changeset View
Standalone View
Standalone View
src/script/interpreter.h
Show First 20 Lines • Show All 94 Lines • ▼ Show 20 Lines | bool EvalScript(std::vector<std::vector<uint8_t>> &stack, const CScript &script, | ||||
ScriptExecutionMetrics &metrics, ScriptError *error = nullptr); | ScriptExecutionMetrics &metrics, ScriptError *error = nullptr); | ||||
static inline bool EvalScript(std::vector<std::vector<uint8_t>> &stack, | static inline bool EvalScript(std::vector<std::vector<uint8_t>> &stack, | ||||
const CScript &script, uint32_t flags, | const CScript &script, uint32_t flags, | ||||
const BaseSignatureChecker &checker, | const BaseSignatureChecker &checker, | ||||
ScriptError *error = nullptr) { | ScriptError *error = nullptr) { | ||||
ScriptExecutionMetrics dummymetrics; | ScriptExecutionMetrics dummymetrics; | ||||
return EvalScript(stack, script, flags, checker, dummymetrics, error); | return EvalScript(stack, script, flags, checker, dummymetrics, error); | ||||
} | } | ||||
/** | |||||
* 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) | |||||
*/ | |||||
bool VerifyScript(const CScript &scriptSig, const CScript &scriptPubKey, | bool VerifyScript(const CScript &scriptSig, const CScript &scriptPubKey, | ||||
uint32_t flags, const BaseSignatureChecker &checker, | uint32_t flags, const BaseSignatureChecker &checker, | ||||
ScriptExecutionMetrics &metricsOut, | |||||
ScriptError *serror = nullptr); | ScriptError *serror = nullptr); | ||||
static inline bool VerifyScript(const CScript &scriptSig, | |||||
const CScript &scriptPubKey, uint32_t flags, | |||||
const BaseSignatureChecker &checker, | |||||
ScriptError *serror = nullptr) { | |||||
ScriptExecutionMetrics dummymetrics; | |||||
return VerifyScript(scriptSig, scriptPubKey, flags, checker, dummymetrics, | |||||
serror); | |||||
} | |||||
int FindAndDelete(CScript &script, const CScript &b); | int FindAndDelete(CScript &script, const CScript &b); | ||||
#endif // BITCOIN_SCRIPT_INTERPRETER_H | #endif // BITCOIN_SCRIPT_INTERPRETER_H |