Returns whether this follows the OP_HASH160 <20 byte hash> OP_EQUAL pattern.
(self)
| 202 | and self.cmds[3] == 0x88 and self.cmds[4] == 0xac |
| 203 | |
| 204 | def is_p2sh_script_pubkey(self): |
| 205 | '''Returns whether this follows the |
| 206 | OP_HASH160 <20 byte hash> OP_EQUAL pattern.''' |
| 207 | return len(self.cmds) == 3 and self.cmds[0] == 0xa9 \ |
| 208 | and type(self.cmds[1]) == bytes and len(self.cmds[1]) == 20 \ |
| 209 | and self.cmds[2] == 0x87 |
| 210 | |
| 211 | |
| 212 | class ScriptTest(TestCase): |