From 0091dc4e6d8b5cbb961ab5e7c7001b5d19d0a667 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 10 Aug 2023 09:30:45 +0930 Subject: [PATCH] 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 --- plugins/renepay/payment.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/renepay/payment.h b/plugins/renepay/payment.h index b59eaad95..159028369 100644 --- a/plugins/renepay/payment.h +++ b/plugins/renepay/payment.h @@ -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;