connectd: move list entries of structs to top, to help dev-memleak detection.

We sweep looking for pointers to tal objects; we don't look for pointers
inside them.  Thus lists only work transparently if they're at the head
of the object; so far this has been sufficient.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2018-08-24 16:27:14 +09:30 committed by Christian Decker
parent f80955c932
commit f80176eae9
1 changed files with 4 additions and 4 deletions

View File

@ -133,11 +133,11 @@ struct daemon {
/* Peers we're trying to reach. */
struct reaching {
struct daemon *daemon;
/* daemon->reaching */
struct list_node list;
struct daemon *daemon;
/* The ID of the peer (not necessarily unique, in transit!) */
struct pubkey id;
@ -161,11 +161,11 @@ struct reaching {
/* This is a transitory structure: we hand off to the master daemon as soon
* as we've completed INIT read/write. */
struct peer {
struct daemon *daemon;
/* For reconnecting peers, this is in daemon->reconnecting. */
struct list_node list;
struct daemon *daemon;
/* The ID of the peer */
struct pubkey id;