BIP144: * If the witness is empty, the old serialization format should be used. */
| 410 | /* BIP144: |
| 411 | * If the witness is empty, the old serialization format should be used. */ |
| 412 | static bool uses_witness(const struct wally_tx *wtx) |
| 413 | { |
| 414 | size_t i; |
| 415 | |
| 416 | for (i = 0; i < wtx->num_inputs; i++) { |
| 417 | if (wtx->inputs[i].witness) |
| 418 | return true; |
| 419 | } |
| 420 | return false; |
| 421 | } |
| 422 | |
| 423 | u8 *linearize_tx(const tal_t *ctx, const struct bitcoin_tx *tx) |
| 424 | { |