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

Function is_segwit_output

common/interactivetx.c:73–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73static bool is_segwit_output(const tal_t *ctx,
74 struct wally_tx_output *output,
75 const u8 *redeemscript)
76{
77 const u8 *maybe_witness = redeemscript;
78 size_t script_len = tal_bytelen(maybe_witness);
79
80 if (!script_len) {
81 maybe_witness = output->script;
82 script_len = output->script_len;
83 }
84
85 return is_known_segwit_scripttype(maybe_witness, script_len);
86}
87
88/* Return first non-handled message or NULL if connection is aborted */
89static u8 *read_next_msg(const tal_t *ctx,

Callers 1

Calls 2

tal_bytelenFunction · 0.85

Tested by

no test coverage detected