| 19 | }; |
| 20 | |
| 21 | static const struct tlv_field *next_field_create(bool *is_omitted, |
| 22 | struct creator *creator) |
| 23 | { |
| 24 | if (creator->n_inv >= tal_count(creator->inv->fields)) |
| 25 | return NULL; |
| 26 | /* If all included fields consumed, remaining must be omitted */ |
| 27 | if (creator->n_included >= tal_count(creator->included)) |
| 28 | *is_omitted = true; |
| 29 | else |
| 30 | *is_omitted = (creator->inv->fields[creator->n_inv].numtype |
| 31 | != creator->included[creator->n_included].numtype); |
| 32 | |
| 33 | if (!*is_omitted) |
| 34 | creator->n_included++; |
| 35 | return &creator->inv->fields[creator->n_inv++]; |
| 36 | } |
| 37 | |
| 38 | /* BOLT-payer_proof #12: |
| 39 | * - MUST populate `proof_missing_hashes` with the merkle hash of the omitted branch |
nothing calls this directly
no outgoing calls
no test coverage detected