| 515 | } |
| 516 | |
| 517 | static bool is_openers(const struct wally_map *unknowns) |
| 518 | { |
| 519 | /* BOLT-f53ca2301232db780843e894f55d95d512f297f9 #2: |
| 520 | * The sending node: ... |
| 521 | * - if is the *initiator*: |
| 522 | * - MUST send even `serial_id`s |
| 523 | * - if is the *non-initiator*: |
| 524 | * - MUST send odd `serial_id`s |
| 525 | */ |
| 526 | u64 serial_id; |
| 527 | if (!psbt_get_serial_id(unknowns, &serial_id)) |
| 528 | status_failed(STATUS_FAIL_INTERNAL_ERROR, |
| 529 | "PSBTs must have serial_ids set"); |
| 530 | |
| 531 | return serial_id % 2 == TX_INITIATOR; |
| 532 | } |
| 533 | |
| 534 | static size_t psbt_input_weight(struct wally_psbt *psbt, |
| 535 | size_t in) |
no test coverage detected