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