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=())
| 708 | |
| 709 | |
| 710 | def 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 | |
| 734 | class VerifyScriptError(bitcoin.core.ValidationError): |
| 735 | pass |
no test coverage detected