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

Function psbt_get_serial_id

common/psbt_open.c:11–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 12

psbt_to_witness_stacksFunction · 0.85
compare_serialsFunction · 0.85
psbt_find_serial_inputFunction · 0.85
psbt_find_serial_outputFunction · 0.85
psbt_has_required_fieldsFunction · 0.85
psbt_side_finalizedFunction · 0.85
psbt_add_serialsFunction · 0.85
update_parent_psbtFunction · 0.85
update_node_psbtFunction · 0.85
psbt_changeset_get_nextFunction · 0.85
is_openersFunction · 0.85
handle_tx_sigsFunction · 0.85

Calls 2

psbt_get_lightningFunction · 0.85
be64_to_cpuFunction · 0.85

Tested by

no test coverage detected