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:
@@ -12,6 +12,7 @@
|
||||
#include <common/bolt11.h>
|
||||
#include <common/features.h>
|
||||
#include <common/setup.h>
|
||||
#include <common/utils.h>
|
||||
#include <common/version.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <common/features.h>
|
||||
#include <common/iso4217.h>
|
||||
#include <common/setup.h>
|
||||
#include <common/utils.h>
|
||||
#include <common/version.h>
|
||||
#include <inttypes.h>
|
||||
#include <secp256k1_schnorrsig.h>
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <ccan/tal/path/path.h>
|
||||
#include <common/configdir.h>
|
||||
#include <common/node_id.h>
|
||||
#include <common/utils.h>
|
||||
#include <inttypes.h>
|
||||
#include <sqlite3.h>
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <ccan/opt/opt.h>
|
||||
#include <ccan/read_write_all/read_write_all.h>
|
||||
#include <common/gossip_store.h>
|
||||
#include <common/utils.h>
|
||||
#include <fcntl.h>
|
||||
#include <gossipd/gossip_store_wiregen.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <ccan/opt/opt.h>
|
||||
#include <ccan/read_write_all/read_write_all.h>
|
||||
#include <common/gossip_store.h>
|
||||
#include <common/utils.h>
|
||||
#include <fcntl.h>
|
||||
#include <gossipd/gossip_store_wiregen.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <ccan/opt/opt.h>
|
||||
#include <ccan/tal/grab_file/grab_file.h>
|
||||
#include <common/setup.h>
|
||||
#include <common/utils.h>
|
||||
#include <unistd.h>
|
||||
#include <wire/onion_printgen.h>
|
||||
#include <wire/peer_printgen.h>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <ccan/err/err.h>
|
||||
#include <ccan/opt/opt.h>
|
||||
#include <common/gossip_store.h>
|
||||
#include <common/utils.h>
|
||||
#include <fcntl.h>
|
||||
#include <gossipd/gossip_store_wiregen.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <ccan/read_write_all/read_write_all.h>
|
||||
#include <ccan/str/hex/hex.h>
|
||||
#include <ccan/tal/str/str.h>
|
||||
#include <ccan/time/time.h>
|
||||
#include <common/cryptomsg.h>
|
||||
#include <common/features.h>
|
||||
#include <common/peer_failed.h>
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <common/gossip_store.h>
|
||||
#include <common/gossmap.h>
|
||||
#include <common/setup.h>
|
||||
#include <common/utils.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <gossipd/gossip_store_wiregen.h>
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <common/htlc_wire.h>
|
||||
#include <common/key_derive.h>
|
||||
#include <common/status.h>
|
||||
#include <common/utils.h>
|
||||
#include <common/version.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <ccan/err/err.h>
|
||||
#include <ccan/str/hex/hex.h>
|
||||
#include <common/decode_array.h>
|
||||
#include <common/utils.h>
|
||||
#include <stdio.h>
|
||||
|
||||
static NORETURN void usage(void)
|
||||
|
||||
@@ -8,11 +8,13 @@
|
||||
*/
|
||||
#include "config.h"
|
||||
#include <assert.h>
|
||||
#include <bitcoin/signature.h>
|
||||
#include <ccan/crc32c/crc32c.h>
|
||||
#include <ccan/err/err.h>
|
||||
#include <ccan/opt/opt.h>
|
||||
#include <ccan/str/hex/hex.h>
|
||||
#include <ccan/tal/str/str.h>
|
||||
#include <common/utils.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
#include <wire/peer_wire.h>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "config.h"
|
||||
#include <ccan/err/err.h>
|
||||
#include <ccan/str/hex/hex.h>
|
||||
#include <common/utils.h>
|
||||
#include <stdio.h>
|
||||
#include <wire/peer_wire.h>
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <common/onion_decode.h>
|
||||
#include <common/onion_encode.h>
|
||||
#include <common/sphinx.h>
|
||||
#include <common/utils.h>
|
||||
#include <common/version.h>
|
||||
#include <err.h>
|
||||
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
#include "config.h"
|
||||
#include <bitcoin/preimage.h>
|
||||
#include <bitcoin/signature.h>
|
||||
#include <bitcoin/tx.h>
|
||||
#include <ccan/mem/mem.h>
|
||||
#include <ccan/utf8/utf8.h>
|
||||
#include <common/channel_id.h>
|
||||
#include <common/decode_array.h>
|
||||
#include <common/sciddir_or_pubkey.h>
|
||||
#include <common/utils.h>
|
||||
#include <devtools/print_wire.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
#ifndef LIGHTNING_DEVTOOLS_PRINT_WIRE_H
|
||||
#define LIGHTNING_DEVTOOLS_PRINT_WIRE_H
|
||||
#include "config.h"
|
||||
#include <bitcoin/preimage.h>
|
||||
#include <bitcoin/tx.h>
|
||||
#include <common/wireaddr.h>
|
||||
#include <wire/peer_wire.h>
|
||||
#include <wire/onion_wire.h>
|
||||
#include <wire/onion_wiregen.h>
|
||||
|
||||
struct tlv_print_record_type {
|
||||
u64 type;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <common/gossmap.h>
|
||||
#include <common/route.h>
|
||||
#include <common/setup.h>
|
||||
#include <common/utils.h>
|
||||
#include <devtools/clean_topo.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <common/dijkstra.h>
|
||||
#include <common/gossmap.h>
|
||||
#include <common/route.h>
|
||||
#include <common/utils.h>
|
||||
#include <devtools/clean_topo.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
|
||||
Reference in New Issue
Block a user