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

Function audit_map

bitcoin/psbt.c:114–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112 ((item) == NULL || parent_or_grandparent((parent), (item)))
113
114static void audit_map(const tal_t *ctx, const struct wally_map *map)
115{
116 assert(NULL_OR_MATCH_P(map->items, ctx));
117 for (size_t i = 0; i < map->num_items; i++) {
118 assert(NULL_OR_MATCH_P(map->items[i].key, ctx));
119 assert(NULL_OR_MATCH_P(map->items[i].value, ctx));
120 assert(!map->items[i].key
121 || tal_bytelen(map->items[i].key)
122 == map->items[i].key_len);
123 assert(!map->items[i].value
124 || tal_bytelen(map->items[i].value)
125 == map->items[i].value_len);
126 }
127}
128
129void audit_psbt(const tal_t *ctx, const struct wally_psbt *psbt)
130{

Callers 1

audit_psbtFunction · 0.85

Calls 1

tal_bytelenFunction · 0.85

Tested by

no test coverage detected