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

Function sphinx_path_new

common/sphinx.c:56–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54};
55
56struct sphinx_path *sphinx_path_new(const tal_t *ctx,
57 const u8 *associated_data,
58 size_t associated_data_len)
59{
60 struct sphinx_path *sp = tal(ctx, struct sphinx_path);
61 if (associated_data) {
62 sp->associated_data
63 = tal_dup_arr(sp, u8, associated_data, associated_data_len, 0);
64 } else {
65 assert(associated_data_len == 0);
66 sp->associated_data = NULL;
67 }
68 sp->session_key = NULL;
69 sp->rendezvous_id = NULL;
70 sp->hops = tal_arr(sp, struct sphinx_hop, 0);
71 return sp;
72}
73
74struct sphinx_path *sphinx_path_new_with_key(const tal_t *ctx,
75 const u8 *associated_data,

Callers 8

send_paymentFunction · 0.85
json_createonionFunction · 0.85
sphinx_path_new_with_keyFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
inject_onionmessage_Function · 0.85
create_onionFunction · 0.85
create_onionFunction · 0.85

Calls

no outgoing calls

Tested by 2

mainFunction · 0.68
mainFunction · 0.68