renepay: move list_node to first member of struct payment.

Results in payments having a pointer to the start of the object,
which helps our memleak code.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2023-08-10 09:30:45 +09:30
parent 008bd74c93
commit 0091dc4e6d

View file

@ -10,6 +10,9 @@ enum payment_status {
struct payment {
/* Inside pay_plugin->payments list */
struct list_node list;
struct renepay * renepay;
/* Chatty description of attempts. */
@ -56,9 +59,6 @@ struct payment {
u32 final_cltv;
/* Inside pay_plugin->payments list */
struct list_node list;
/* Description and labels, if any. */
const char *description, *label;