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:
Rusty Russell
2025-10-22 19:44:27 +10:30
parent 65d997842e
commit f6a4e79420
212 changed files with 178 additions and 153 deletions

View File

@@ -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 #include <bitcoin/block.h> #include <common/channel_id.h>
#include <bitcoin/block.h>
1 #include <common/channel_id.h> #include <common/channel_id.h>
#include <common/cryptomsg.h>
2 #include <common/features.h> #include <common/features.h>
3 #include <common/node_id.h> #include <common/node_id.h>
4 #include <common/wireaddr.h> #include <common/wireaddr.h>
5 #include <wire/onion_wire.h> #include <wire/onion_wiregen.h>
6 msgtype,connectd_init,2000 msgtype,connectd_init,2000
7 msgdata,connectd_init,chainparams,chainparams, msgdata,connectd_init,chainparams,chainparams,
8 msgdata,connectd_init,our_features,feature_set, msgdata,connectd_init,our_features,feature_set,