| 135 | } |
| 136 | |
| 137 | void towire_fee_states(u8 **pptr, const struct fee_states *fee_states) |
| 138 | { |
| 139 | for (enum htlc_state i = 0; i < ARRAY_SIZE(fee_states->feerate); i++) { |
| 140 | /* We don't send uncommitted feestates */ |
| 141 | if (!(htlc_state_flags(i) & (HTLC_REMOTE_F_COMMITTED |
| 142 | | HTLC_LOCAL_F_COMMITTED)) |
| 143 | || fee_states->feerate[i] == NULL) { |
| 144 | towire_bool(pptr, false); |
| 145 | continue; |
| 146 | } |
| 147 | towire_bool(pptr, true); |
| 148 | towire_u32(pptr, *fee_states->feerate[i]); |
| 149 | } |
| 150 | } |
| 151 | |
| 152 | /* FIXME: we don't know opener inside fromwire_fee_states, so can't do |
| 153 | * this there :( */ |
nothing calls this directly
no test coverage detected