| 637 | } |
| 638 | |
| 639 | static bool is_openers(const struct wally_map *unknowns) |
| 640 | { |
| 641 | /* BOLT #2: |
| 642 | * The sending node: ... |
| 643 | * - if is the *initiator*: |
| 644 | * - MUST send even `serial_id`s |
| 645 | * - if is the *non-initiator*: |
| 646 | * - MUST send odd `serial_id`s |
| 647 | */ |
| 648 | u64 serial_id; |
| 649 | if (!psbt_get_serial_id(unknowns, &serial_id)) |
| 650 | status_failed(STATUS_FAIL_INTERNAL_ERROR, |
| 651 | "PSBTs must have serial_ids set"); |
| 652 | |
| 653 | return serial_id % 2 == TX_INITIATOR; |
| 654 | } |
| 655 | |
| 656 | static bool find_txout(struct wally_psbt *psbt, const u8 *wscript, u32 *funding_txout) |
| 657 | { |
no test coverage detected