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

Function is_openers

openingd/dualopend.c:639–654  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

637}
638
639static 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
656static bool find_txout(struct wally_psbt *psbt, const u8 *wscript, u32 *funding_txout)
657{

Callers 1

check_balancesFunction · 0.85

Calls 2

psbt_get_serial_idFunction · 0.85
status_failedFunction · 0.50

Tested by

no test coverage detected