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

Function new_attempt

plugins/xpay/xpay.c:1542–1556  ·  view source on GitHub ↗

Does not set shared_secrets */

Source from the content-addressed store, hash-verified

1540
1541/* Does not set shared_secrets */
1542static struct attempt *new_attempt(struct payment *payment,
1543 struct amount_msat amount,
1544 const struct hop *hops TAKES)
1545{
1546 struct attempt *attempt = tal(payment, struct attempt);
1547
1548 attempt->payment = payment;
1549 attempt->amount = amount;
1550 attempt->preimage = NULL;
1551 attempt->partid = ++payment->total_num_attempts;
1552 attempt->hops = tal_dup_talarr(attempt, struct hop, hops);
1553 list_add_tail(&payment->current_attempts, &attempt->list);
1554
1555 return attempt;
1556}
1557
1558/* BOLT #7:
1559 *

Callers 2

getroutes_doneFunction · 0.85
getroutes_forFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected