Test if the script is a p2sh scriptPubKey Note that this test is consensus-critical.
(self)
| 661 | return "CScript([%s])" % ', '.join(ops) |
| 662 | |
| 663 | def is_p2sh(self): |
| 664 | """Test if the script is a p2sh scriptPubKey |
| 665 | |
| 666 | Note that this test is consensus-critical. |
| 667 | """ |
| 668 | return (len(self) == 23 and |
| 669 | self[0] == OP_HASH160 and |
| 670 | self[1] == 0x14 and |
| 671 | self[22] == OP_EQUAL) |
| 672 | |
| 673 | def is_witness_scriptpubkey(self): |
| 674 | """Returns true if this is a scriptpubkey signaling segregated witness data. |
no outgoing calls