(self, input_index)
| 190 | |
| 191 | |
| 192 | def verify_input(self, input_index): |
| 193 | tx_in = self.tx_ins[input_index] |
| 194 | script_pubkey = tx_in.script_pubkey(testnet=self.testnet) |
| 195 | if script_pubkey.is_p2sh_script_pubkey(): |
| 196 | cmd = tx_in.script_sig.cmds[-1] |
| 197 | raw_redeem = encode_varint(len(cmd)) + cmd |
| 198 | redeem_script = Script.parse(BytesIO(raw_redeem)) |
| 199 | else: |
| 200 | redeem_script = None |
| 201 | z = self.sig_hash(input_index, redeem_script) |
| 202 | combined = tx_in.script_sig + script_pubkey |
| 203 | return combined.evaluate(z) |
| 204 | # end::answer5[] |
| 205 | |
| 206 |
nothing calls this directly
no test coverage detected