| 259 | */ |
| 260 | |
| 261 | static 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 | |
| 278 | REGISTER_PAYMENT_MODIFIER(selfpay, selfpay_cb); |
| 279 |
nothing calls this directly
no test coverage detected