| 71 | } |
| 72 | |
| 73 | static 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 */ |
| 89 | static u8 *read_next_msg(const tal_t *ctx, |
no test coverage detected