BIP144: * If the witness is empty, the old serialization format should be used. */
| 422 | /* BIP144: |
| 423 | * If the witness is empty, the old serialization format should be used. */ |
| 424 | static bool uses_witness(const struct wally_tx *wtx) |
| 425 | { |
| 426 | size_t i; |
| 427 | |
| 428 | for (i = 0; i < wtx->num_inputs; i++) { |
| 429 | if (wtx->inputs[i].witness) |
| 430 | return true; |
| 431 | } |
| 432 | return false; |
| 433 | } |
| 434 | |
| 435 | u8 *linearize_tx(const tal_t *ctx, const struct bitcoin_tx *tx) |
| 436 | { |