Files
Rusty Russell f6a4e79420 global: remove unnecessary includes from headers.
Each header should only include the other headers it needs to compile;
`devtools/reduce-includes.sh */*.h` does this.  The C files then need
additional includes if they don't compile.

And remove the entirely useless wire/onion_wire.h, which only serves to include wire/onion_wiregen.h.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-10-23 06:44:04 +10:30

21 lines
578 B
C

#ifndef LIGHTNING_LIGHTNINGD_PEER_FD_H
#define LIGHTNING_LIGHTNINGD_PEER_FD_H
#include "config.h"
#include <ccan/tal/tal.h>
/* Tal wrapper for fd connecting subd to connectd */
struct peer_fd {
/* If not -1, closed on freeing */
int fd;
};
/* Allocate a new per-peer state and add destructor to close fd if set. */
RETURNS_NONNULL
struct peer_fd *new_peer_fd(const tal_t *ctx, int peer_fd);
/* Array version of above: tal_count(fds) must be 1 */
RETURNS_NONNULL
struct peer_fd *new_peer_fd_arr(const tal_t *ctx, const int *fd);
#endif /* LIGHTNING_LIGHTNINGD_PEER_FD_H */