cln/plugins/renepay
Lagrang3 580c2f7854 renepay: refactor and bugfixes
We remove the auxiliary RPC renesenday (only used internally) in favor
of a function that builds the onion, stores the shared secrets
needed to recover the onion reply, and calls sendonion/injectpaymentonion.

This solves a concurrency race
```
**BROKEN** plugin-cln-renepay: Unable to parse sendpay_failure
```
in which we are waiting for renesenday to return in order to record the shared
secrets but we get the a sendpay_failure notification with an onionreply
before we have secrets to decode it.

It also solves a missing JSON id seen in the logs
```
DEBUG   plugin-cln-renepay: JSON reply with unknown id
```
because renesendpay was using his command variable to issue an RPC
to sendonion/injecpaymentonion and would fail or succeed the command
before those RPCs were done. This also meant that the callback
functions were silently being ignored.

Changelog-Fixed: renepay: fixes a race condition that leads to **BROKEN** plugin-cln-renepay: Unable to parse sendpay_failure

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
2026-02-23 14:32:56 +10:30
..
test common: move gossip_store_wire.csv into common/ from gossipd/ 2026-02-16 17:23:33 +10:30
chan_extra.c common: add amount_msat_deduct / amount_msat_deduct_sub. 2025-11-17 10:56:18 +10:30
chan_extra.h bitcoin: hash_scid and hash_scidd public functions. 2026-02-19 17:04:35 +10:30
dijkstra.c plugins/renepay/dijkstra: improve API to remove global. 2023-07-31 12:58:56 +09:30
dijkstra.h plugins/renepay/dijkstra: improve API to remove global. 2023-07-31 12:58:56 +09:30
disabledmap.c bitcoin: hash_scid and hash_scidd public functions. 2026-02-19 17:04:35 +10:30
disabledmap.h bitcoin: hash_scid and hash_scidd public functions. 2026-02-19 17:04:35 +10:30
errorcodes.c renepay: minor fixes 2024-05-08 22:32:13 -05:00
errorcodes.h renepay: minor fixes 2024-05-08 22:32:13 -05:00
flow.c common/amount: rename amount_sat_zero/amount_msat_zerp -> amount_sat_is_zero/amount_msat_is_zero. 2024-09-19 12:16:53 +09:30
flow.h renepay: add precondition check + error msg 2024-08-19 10:11:35 -07:00
json.c renepay: decode error onion 2025-02-12 13:36:06 +10:30
json.h renepay: decode error onion 2025-02-12 13:36:06 +10:30
main.c renepay: refactor and bugfixes 2026-02-23 14:32:56 +10:30
Makefile renepay: refactor and bugfixes 2026-02-23 14:32:56 +10:30
mcf.c common: add amount_msat_deduct / amount_msat_deduct_sub. 2025-11-17 10:56:18 +10:30
mcf.h chore: fix some minor issues 2025-08-15 11:05:51 +09:30
mods.c renepay: refactor and bugfixes 2026-02-23 14:32:56 +10:30
mods.h renepay: payment state machine (mods) 2024-05-08 22:32:13 -05:00
payment.c global: use clock_time in place of time_now(). 2025-11-13 21:21:29 +10:30
payment.h renepay: refactor and bugfixes 2026-02-23 14:32:56 +10:30
payment_info.h renepay: parse bolt12 invoices 2025-02-12 13:36:06 +10:30
payplugin.h renepay: remove unnecessary payment list 2024-08-12 13:27:34 -07:00
renepayconfig.h renepay: small tweak to decay time 2024-08-12 13:17:21 -07:00
route.c renepay: bugfix: read groupids as u64 2025-02-13 19:16:21 -06:00
route.h renepay: bugfix: read groupids as u64 2025-02-13 19:16:21 -06:00
routebuilder.c common: add amount_msat_deduct / amount_msat_deduct_sub. 2025-11-17 10:56:18 +10:30
routebuilder.h renepay: enable routing through blinded paths 2025-02-12 13:36:06 +10:30
routefail.c renepay: don't fail parsing sendpay error 2025-02-12 13:36:06 +10:30
routefail.h renepay: add routefail.c 2024-05-08 22:32:13 -05:00
routetracker.c renepay: refactor and bugfixes 2026-02-23 14:32:56 +10:30
routetracker.h renepay: refactor and bugfixes 2026-02-23 14:32:56 +10:30
uncertainty.c renepay: resolve self payments with fake node 2025-02-12 13:36:06 +10:30
uncertainty.h renepay: resolve self payments with fake node 2025-02-12 13:36:06 +10:30