MCPcopy Create free account
hub / github.com/ElementsProject/lightning / is_openers

Function is_openers

openingd/dualopend.c:517–532  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

515}
516
517static 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
534static size_t psbt_input_weight(struct wally_psbt *psbt,
535 size_t in)

Callers 1

check_balancesFunction · 0.85

Calls 2

psbt_get_serial_idFunction · 0.85
status_failedFunction · 0.50

Tested by

no test coverage detected