| 112 | ((item) == NULL || parent_or_grandparent((parent), (item))) |
| 113 | |
| 114 | static 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 | |
| 129 | void audit_psbt(const tal_t *ctx, const struct wally_psbt *psbt) |
| 130 | { |
no test coverage detected