We can extract nodeid from ids[], but usually we can get it from the * previous next_node_id. */
| 33 | /* We can extract nodeid from ids[], but usually we can get it from the |
| 34 | * previous next_node_id. */ |
| 35 | static const struct pubkey * |
| 36 | get_nodeid(const struct tlv_encrypted_data_tlv **tlvs, |
| 37 | const struct pubkey *ids, |
| 38 | size_t i) |
| 39 | { |
| 40 | if (i == 0) |
| 41 | return &ids[0]; |
| 42 | |
| 43 | if (tlvs[i-1]->next_node_id == NULL) { |
| 44 | /* If you didn't set next_node_id you have to set |
| 45 | * short_channel_id! */ |
| 46 | assert(tlvs[i-1]->short_channel_id); |
| 47 | assert(i < tal_count(ids)); |
| 48 | return &ids[i]; |
| 49 | } |
| 50 | |
| 51 | return tlvs[i-1]->next_node_id; |
| 52 | } |
| 53 | |
| 54 | /* Stage 1: tlv_encrypted_data_tlv[] -> struct blinded_path. |
| 55 | * Optional array of node_ids, consulted iff tlv uses scid in one entry. */ |
no outgoing calls
no test coverage detected