Return True if the script is valid, False otherwise The script is valid if all PUSHDATA's are valid; invalid opcodes do not make is_valid() return False.
(self)
| 763 | self[0] == OP_RETURN) |
| 764 | |
| 765 | def is_valid(self): |
| 766 | """Return True if the script is valid, False otherwise |
| 767 | |
| 768 | The script is valid if all PUSHDATA's are valid; invalid opcodes do not |
| 769 | make is_valid() return False. |
| 770 | """ |
| 771 | try: |
| 772 | list(self) |
| 773 | except CScriptInvalidError: |
| 774 | return False |
| 775 | return True |
| 776 | |
| 777 | def to_p2sh_scriptPubKey(self, checksize=True): |
| 778 | """Create P2SH scriptPubKey from this redeemScript |