Files
palladum-lightning/common/per_peer_state.h
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

23 lines
673 B
C

#ifndef LIGHTNING_COMMON_PER_PEER_STATE_H
#define LIGHTNING_COMMON_PER_PEER_STATE_H
#include "config.h"
#include <common/crypto_state.h>
/* Things we hand between daemons to talk to peers. */
struct per_peer_state {
/* If not -1, closed on freeing */
int peer_fd;
};
/* Allocate a new per-peer state and add destructor to close fds if set;
* sets peer_fd to -1. */
struct per_peer_state *new_per_peer_state(const tal_t *ctx);
/* Initialize the fds (must be -1 previous) */
void per_peer_state_set_fd(struct per_peer_state *pps, int peer_fd);
void per_peer_state_fdpass_send(int fd, const struct per_peer_state *pps);
#endif /* LIGHTNING_COMMON_PER_PEER_STATE_H */