| 550 | } |
| 551 | |
| 552 | static 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 | |
| 570 | void *psbt_get_lightning(const struct wally_map *map, |
| 571 | const u8 proprietary_type, |
no test coverage detected