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

Function psbt_get_unknown

bitcoin/psbt.c:552–568  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

550}
551
552static void *psbt_get_unknown(const struct wally_map *map,
553 const u8 *key,
554 size_t *val_len)
555{
556 size_t index;
557
558 if (wally_map_find(map, key, tal_bytelen(key), &index) != WALLY_OK)
559 return NULL;
560
561 /* Zero: item not found. */
562 if (index == 0)
563 return NULL;
564
565 /* ++: item is at this index minus 1 */
566 *val_len = map->items[index - 1].value_len;
567 return map->items[index - 1].value;
568}
569
570void *psbt_get_lightning(const struct wally_map *map,
571 const u8 proprietary_type,

Callers 1

psbt_get_lightningFunction · 0.85

Calls 1

tal_bytelenFunction · 0.85

Tested by

no test coverage detected