MCPcopy Index your code
hub / github.com/petertodd/python-bitcoinlib / EvalScript

Function EvalScript

bitcoin/core/scripteval.py:710–732  ·  view source on GitHub ↗

Evaluate a script stack - Initial stack scriptIn - Script txTo - Transaction the script is a part of inIdx - txin index of the scriptSig flags - SCRIPT_VERIFY_* flags to apply

(stack, scriptIn, txTo, inIdx, flags=())

Source from the content-addressed store, hash-verified

708
709
710def EvalScript(stack, scriptIn, txTo, inIdx, flags=()):
711 """Evaluate a script
712
713 stack - Initial stack
714
715 scriptIn - Script
716
717 txTo - Transaction the script is a part of
718
719 inIdx - txin index of the scriptSig
720
721 flags - SCRIPT_VERIFY_* flags to apply
722 """
723
724 try:
725 _EvalScript(stack, scriptIn, txTo, inIdx, flags=flags)
726 except CScriptInvalidError as err:
727 raise EvalScriptError(repr(err),
728 stack=stack,
729 scriptIn=scriptIn,
730 txTo=txTo,
731 inIdx=inIdx,
732 flags=flags)
733
734class VerifyScriptError(bitcoin.core.ValidationError):
735 pass

Callers 1

VerifyScriptFunction · 0.85

Calls 2

_EvalScriptFunction · 0.85
EvalScriptErrorClass · 0.85

Tested by

no test coverage detected