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

Function incoming_message_blinded_path

common/onion_message.c:134–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132}
133
134struct blinded_path *incoming_message_blinded_path(const tal_t *ctx,
135 const struct pubkey *ids,
136 const struct short_channel_id **scids,
137 const struct secret *path_secret)
138{
139 struct tlv_encrypted_data_tlv **etlvs;
140 size_t nhops = tal_count(ids);
141
142 assert(nhops > 0);
143 etlvs = new_encdata_tlvs(tmpctx, ids, scids);
144
145 /* Put path_secret into final hop (us) */
146 etlvs[nhops-1]->path_id = tal_dup_arr(etlvs[nhops-1], u8,
147 path_secret->data,
148 ARRAY_SIZE(path_secret->data), 0);
149
150 return blinded_path_from_encdata_tlvs(ctx,
151 cast_const2(const struct tlv_encrypted_data_tlv **, etlvs),
152 ids);
153}
154
155static void extend_blinded_path(struct blinded_path *bpath,
156 const struct blinded_path_hop *hop)

Callers 4

make_reply_pathFunction · 0.85
offer_onehop_pathsFunction · 0.85
json_offerFunction · 0.85

Calls 2

new_encdata_tlvsFunction · 0.85

Tested by

no test coverage detected