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

Function selfpay_cb

plugins/renepay/mods.c:261–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

259 */
260
261static struct command_result *selfpay_cb(struct payment *payment)
262{
263 /* A different approach to self-pay: create a fake channel from the
264 * bolt11 destination to the routing_destination (a fake node_id). */
265 if (!payment->payment_info.blinded_paths) {
266 struct amount_msat htlc_min = AMOUNT_MSAT(0);
267 struct amount_msat htlc_max = AMOUNT_MSAT((u64)1000*100000000);
268 struct short_channel_id scid = {.u64 = 0};
269 add_hintchan(payment, &payment->payment_info.destination,
270 payment->routing_destination,
271 /* cltv delta = */ 0, scid,
272 /* base fee = */ 0,
273 /* ppm = */ 0, &htlc_min, &htlc_max);
274 }
275 return payment_continue(payment);
276}
277
278REGISTER_PAYMENT_MODIFIER(selfpay, selfpay_cb);
279

Callers

nothing calls this directly

Calls 2

add_hintchanFunction · 0.85
payment_continueFunction · 0.70

Tested by

no test coverage detected