Verify that an input's scriptSig and witness satisfy the output's scriptPubKey.

Synopsis

Declared in <script/interpreter.h>

bool
VerifyScript(
    CScript const& scriptSig,
    CScript const& scriptPubKey,
    CScriptWitness const* witness,
    script_verify_flags flags,
    BaseSignatureChecker const& checker,
    ScriptError* serror = nullptr);

Return Value

true if the spend is valid under the given flags.

Parameters

Name

Description

scriptSig

The input's signature script.

scriptPubKey

The output script being spent.

witness

The input's witness stack, or null when absent.

flags

The active script verification flags.

checker

The signature checker bound to the spending transaction.

serror

Set to the script error when verification fails.

Created with MrDocs