BOLT #4: * - If `encrypted_recipient_data` is present: *... * - If it is not the final node: * - MUST return an error if the payload contains other tlv fields than * `encrypted_recipient_data` and `current_path_key`. */
| 16 | * `encrypted_recipient_data` and `current_path_key`. |
| 17 | */ |
| 18 | static bool check_nonfinal_tlv(const struct tlv_payload *tlv, |
| 19 | u64 *failtlvtype) |
| 20 | { |
| 21 | for (size_t i = 0; i < tal_count(tlv->fields); i++) { |
| 22 | switch (tlv->fields[i].numtype) { |
| 23 | case TLV_PAYLOAD_CURRENT_PATH_KEY: |
| 24 | case TLV_PAYLOAD_ENCRYPTED_RECIPIENT_DATA: |
| 25 | continue; |
| 26 | } |
| 27 | *failtlvtype = tlv->fields[i].numtype; |
| 28 | return false; |
| 29 | } |
| 30 | return true; |
| 31 | } |
| 32 | |
| 33 | /* BOLT #4: |
| 34 | * - If `encrypted_recipient_data` is present: |
no outgoing calls
no test coverage detected