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

Function new_route

plugins/renepay/route.c:4–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2#include <plugins/renepay/route.h>
3
4struct route *new_route(const tal_t *ctx, u64 groupid,
5 u64 partid, struct sha256 payment_hash,
6 struct amount_msat amount_deliver,
7 struct amount_msat amount_sent)
8{
9 struct route *route = tal(ctx, struct route);
10 route->key.partid = partid;
11 route->key.groupid = groupid;
12 route->key.payment_hash = payment_hash;
13
14 route->final_error = LIGHTNINGD;
15 route->final_msg = NULL;
16 route->hops = NULL;
17 route->success_prob = 0.0;
18 route->result = NULL;
19
20 route->amount_deliver = amount_deliver;
21 route->amount_sent = amount_sent;
22 route->path_num = -1;
23 route->shared_secrets = NULL;
24 return route;
25}
26
27/* Construct a route from a flow.
28 *

Callers 2

flow_to_routeFunction · 0.85
valgrind_ok1Function · 0.85

Calls

no outgoing calls

Tested by 1

valgrind_ok1Function · 0.68