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>
This commit is contained in:
@@ -19,8 +19,10 @@
|
||||
#include <ccan/tal/str/str.h>
|
||||
#include <common/bech32.h>
|
||||
#include <common/bech32_util.h>
|
||||
#include <common/cryptomsg.h>
|
||||
#include <common/daemon_conn.h>
|
||||
#include <common/dev_disconnect.h>
|
||||
#include <common/ecdh.h>
|
||||
#include <common/ecdh_hsmd.h>
|
||||
#include <common/gossip_store.h>
|
||||
#include <common/gossmap.h>
|
||||
@@ -29,6 +31,7 @@
|
||||
#include <common/status.h>
|
||||
#include <common/subdaemon.h>
|
||||
#include <common/timeout.h>
|
||||
#include <common/utils.h>
|
||||
#include <common/wire_error.h>
|
||||
#include <connectd/connectd.h>
|
||||
#include <connectd/connectd_gossipd_wiregen.h>
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
#ifndef LIGHTNING_CONNECTD_CONNECTD_H
|
||||
#define LIGHTNING_CONNECTD_CONNECTD_H
|
||||
#include "config.h"
|
||||
#include <bitcoin/pubkey.h>
|
||||
#include <bitcoin/short_channel_id.h>
|
||||
#include <ccan/crypto/siphash24/siphash24.h>
|
||||
#include <ccan/htable/htable_type.h>
|
||||
#include <ccan/timer/timer.h>
|
||||
#include <common/bigsize.h>
|
||||
#include <common/channel_id.h>
|
||||
#include <common/crypto_state.h>
|
||||
#include <common/node_id.h>
|
||||
#include <common/pseudorand.h>
|
||||
#include <common/wireaddr.h>
|
||||
#include <connectd/handshake.h>
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
#include <common/node_id.h>
|
||||
#include <common/per_peer_state.h>
|
||||
#include <common/wireaddr.h>
|
||||
|
||||
# Communication between gossipd and connectd.
|
||||
msgtype,gossipd_new_peer,4000
|
||||
|
||||
|
@@ -1,10 +1,8 @@
|
||||
#include <bitcoin/block.h>
|
||||
#include <common/channel_id.h>
|
||||
#include <common/cryptomsg.h>
|
||||
#include <common/features.h>
|
||||
#include <common/node_id.h>
|
||||
#include <common/wireaddr.h>
|
||||
#include <wire/onion_wire.h>
|
||||
#include <wire/onion_wiregen.h>
|
||||
|
||||
msgtype,connectd_init,2000
|
||||
msgdata,connectd_init,chainparams,chainparams,
|
||||
|
||||
|
@@ -1,6 +1,7 @@
|
||||
#include "config.h"
|
||||
#include <ccan/crc32c/crc32c.h>
|
||||
#include <common/status.h>
|
||||
#include <common/utils.h>
|
||||
#include <connectd/gossip_store.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <connectd/queries.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <inttypes.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <common/onion_message_parse.h>
|
||||
#include <common/sphinx.h>
|
||||
#include <common/status.h>
|
||||
#include <common/utils.h>
|
||||
#include <common/wire_error.h>
|
||||
#include <connectd/connectd.h>
|
||||
#include <connectd/connectd_wiregen.h>
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
#include "config.h"
|
||||
#include <bitcoin/chainparams.h>
|
||||
#include <ccan/io/io.h>
|
||||
#include <common/cryptomsg.h>
|
||||
#include <common/dev_disconnect.h>
|
||||
#include <common/memleak.h>
|
||||
#include <common/status.h>
|
||||
#include <common/utils.h>
|
||||
#include <common/wire_error.h>
|
||||
#include <connectd/connectd.h>
|
||||
#include <connectd/connectd_wiregen.h>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <common/decode_array.h>
|
||||
#include <common/gossmap.h>
|
||||
#include <common/status.h>
|
||||
#include <common/utils.h>
|
||||
#include <common/wire_error.h>
|
||||
#include <connectd/connectd.h>
|
||||
#include <connectd/connectd_wiregen.h>
|
||||
|
||||
Reference in New Issue
Block a user