| 117 | } |
| 118 | |
| 119 | struct fee_states *fromwire_fee_states(const tal_t *ctx, |
| 120 | const u8 **cursor, size_t *max) |
| 121 | { |
| 122 | struct fee_states *fee_states = tal(ctx, struct fee_states); |
| 123 | |
| 124 | for (enum htlc_state i = 0; i < ARRAY_SIZE(fee_states->feerate); i++) { |
| 125 | if (fromwire_bool(cursor, max)) { |
| 126 | fee_states->feerate[i] = tal(fee_states, u32); |
| 127 | *fee_states->feerate[i] = fromwire_u32(cursor, max); |
| 128 | } else { |
| 129 | fee_states->feerate[i] = NULL; |
| 130 | } |
| 131 | } |
| 132 | if (!*cursor) |
| 133 | return tal_free(fee_states); |
| 134 | return fee_states; |
| 135 | } |
| 136 | |
| 137 | void towire_fee_states(u8 **pptr, const struct fee_states *fee_states) |
| 138 | { |
nothing calls this directly
no test coverage detected