| 116 | } |
| 117 | |
| 118 | void towire_height_states(u8 **pptr, const struct height_states *states) |
| 119 | { |
| 120 | for (enum htlc_state i = 0; i < ARRAY_SIZE(states->height); i++) { |
| 121 | /* We don't send uncommitted feestates */ |
| 122 | if (!(htlc_state_flags(i) & (HTLC_REMOTE_F_COMMITTED |
| 123 | | HTLC_LOCAL_F_COMMITTED)) |
| 124 | || states->height[i] == NULL) { |
| 125 | towire_bool(pptr, false); |
| 126 | continue; |
| 127 | } |
| 128 | towire_bool(pptr, true); |
| 129 | towire_u32(pptr, *states->height[i]); |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | struct height_states *fromwire_height_states(const tal_t *ctx, const u8 **cursor, size_t *max) |
| 134 | { |
nothing calls this directly
no test coverage detected