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

Function psbt_get_serial_id

common/psbt_open.c:12–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10#define MAX_CHANNEL_IDS 4096
11
12bool psbt_get_serial_id(const struct wally_map *map, u64 *serial_id)
13{
14 size_t value_len;
15 beint64_t bev;
16 void *result = psbt_get_lightning(map, PSBT_TYPE_SERIAL_ID, &value_len);
17 if (!result)
18 return false;
19
20 if (value_len != sizeof(bev))
21 return false;
22
23 memcpy(&bev, result, value_len);
24 *serial_id = be64_to_cpu(bev);
25 return true;
26}
27
28static int compare_serials(const struct wally_map *map_a,
29 const struct wally_map *map_b)

Callers 15

missing_user_signaturesFunction · 0.85
is_initiators_serialFunction · 0.85
validate_input_unspentFunction · 0.85
psbt_to_witnessesFunction · 0.85
send_nextFunction · 0.85
get_changesFunction · 0.85
compare_serialsFunction · 0.85
psbt_find_serial_inputFunction · 0.85
psbt_find_serial_outputFunction · 0.85

Calls 2

psbt_get_lightningFunction · 0.85
be64_to_cpuFunction · 0.85

Tested by

no test coverage detected