MCPcopy Create free account
hub / github.com/ElementsProject/lightning / is_anchor_witness_script

Function is_anchor_witness_script

bitcoin/script.c:965–984  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

963}
964
965bool 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
986bool scripteq(const u8 *s1, const u8 *s2)
987{

Callers 2

bitcoin_wscript_anchorFunction · 0.85
psbt_finalizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected