| 963 | } |
| 964 | |
| 965 | bool is_anchor_witness_script(const u8 *script, size_t script_len) |
| 966 | { |
| 967 | if (script_len != 34 + 1 + 1 + 1 + 1 + 1 + 1) |
| 968 | return false; |
| 969 | if (script[0] != OP_PUSHBYTES(33)) |
| 970 | return false; |
| 971 | if (script[34] != OP_CHECKSIG) |
| 972 | return false; |
| 973 | if (script[35] != OP_IFDUP) |
| 974 | return false; |
| 975 | if (script[36] != OP_NOTIF) |
| 976 | return false; |
| 977 | if (script[37] != 0x50 + 16) |
| 978 | return false; |
| 979 | if (script[38] != OP_CHECKSEQUENCEVERIFY) |
| 980 | return false; |
| 981 | if (script[39] != OP_ENDIF) |
| 982 | return false; |
| 983 | return true; |
| 984 | } |
| 985 | |
| 986 | bool scripteq(const u8 *s1, const u8 *s2) |
| 987 | { |
no outgoing calls
no test coverage detected