| 131 | } |
| 132 | |
| 133 | struct height_states *fromwire_height_states(const tal_t *ctx, const u8 **cursor, size_t *max) |
| 134 | { |
| 135 | struct height_states *states = tal(ctx, struct height_states); |
| 136 | |
| 137 | for (enum htlc_state i = 0; i < ARRAY_SIZE(states->height); i++) { |
| 138 | if (fromwire_bool(cursor, max)) { |
| 139 | states->height[i] = tal(states, u32); |
| 140 | *states->height[i] = fromwire_u32(cursor, max); |
| 141 | } else { |
| 142 | states->height[i] = NULL; |
| 143 | } |
| 144 | } |
| 145 | if (!*cursor) |
| 146 | return tal_free(states); |
| 147 | return states; |
| 148 | } |
| 149 | |
| 150 | static const char *fmt_height_states(const tal_t *ctx, |
| 151 | const struct height_states *states) |
nothing calls this directly
no test coverage detected