MCPcopy Create free account
hub / github.com/ElementsProject/lightning / towire_fee_states

Function towire_fee_states

common/fee_states.c:137–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137void 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 :( */

Callers

nothing calls this directly

Calls 3

htlc_state_flagsFunction · 0.70
towire_boolFunction · 0.50
towire_u32Function · 0.50

Tested by

no test coverage detected