diff --git a/bitcoin/block.h b/bitcoin/block.h index a2631b732..a3289ee7c 100644 --- a/bitcoin/block.h +++ b/bitcoin/block.h @@ -4,7 +4,6 @@ #include "bitcoin/shadouble.h" #include #include -#include struct chainparams; diff --git a/bitcoin/feerate.h b/bitcoin/feerate.h index cab1e95e2..f4dbdbbd6 100644 --- a/bitcoin/feerate.h +++ b/bitcoin/feerate.h @@ -2,7 +2,6 @@ #define LIGHTNING_BITCOIN_FEERATE_H #include "config.h" #include -#include #include /* bitcoind considers 250 satoshi per kw to be the minimum acceptable fee: diff --git a/bitcoin/privkey.h b/bitcoin/privkey.h index d592d4685..b4ee35841 100644 --- a/bitcoin/privkey.h +++ b/bitcoin/privkey.h @@ -2,7 +2,6 @@ #define LIGHTNING_BITCOIN_PRIVKEY_H #include "config.h" #include -#include #include #define PRIVKEY_LEN 32 diff --git a/bitcoin/script.c b/bitcoin/script.c index 63974644a..71e0dd075 100644 --- a/bitcoin/script.c +++ b/bitcoin/script.c @@ -9,6 +9,7 @@ #include #include #include +#include /* To push 0-75 bytes onto stack. */ #define OP_PUSHBYTES(val) (val) diff --git a/bitcoin/script.h b/bitcoin/script.h index 5b96d696f..ccbad3bfe 100644 --- a/bitcoin/script.h +++ b/bitcoin/script.h @@ -3,7 +3,6 @@ #include "config.h" #include "signature.h" #include "tx.h" -#include struct bitcoin_address; struct preimage; diff --git a/bitcoin/short_channel_id.h b/bitcoin/short_channel_id.h index 1cd13f9a4..3c7cce903 100644 --- a/bitcoin/short_channel_id.h +++ b/bitcoin/short_channel_id.h @@ -1,7 +1,6 @@ #ifndef LIGHTNING_BITCOIN_SHORT_CHANNEL_ID_H #define LIGHTNING_BITCOIN_SHORT_CHANNEL_ID_H #include "config.h" -#include #include #include #include diff --git a/bitcoin/tx.h b/bitcoin/tx.h index 2549cd5e2..4b7134e0f 100644 --- a/bitcoin/tx.h +++ b/bitcoin/tx.h @@ -2,11 +2,7 @@ #define LIGHTNING_BITCOIN_TX_H #include "config.h" #include -#include -#include #include -#include -#include #include #define BITCOIN_TX_DEFAULT_SEQUENCE 0xFFFFFFFF diff --git a/channeld/channeld.c b/channeld/channeld.c index eb1b7a503..dc8bdf24b 100644 --- a/channeld/channeld.c +++ b/channeld/channeld.c @@ -42,10 +42,12 @@ #include #include #include +#include #include #include #include #include +#include #include #include #include diff --git a/channeld/channeld.h b/channeld/channeld.h index a2b26b082..c57a2902e 100644 --- a/channeld/channeld.h +++ b/channeld/channeld.h @@ -2,7 +2,6 @@ #define LIGHTNING_CHANNELD_CHANNELD_H #include "config.h" #include -#include #include const u8 *hsm_req(const tal_t *ctx, const u8 *req TAKES); diff --git a/channeld/channeld_htlc.h b/channeld/channeld_htlc.h index 14d41f07a..2bd7075c2 100644 --- a/channeld/channeld_htlc.h +++ b/channeld/channeld_htlc.h @@ -1,11 +1,8 @@ #ifndef LIGHTNING_CHANNELD_CHANNELD_HTLC_H #define LIGHTNING_CHANNELD_CHANNELD_HTLC_H #include "config.h" -#include #include #include -#include -#include struct htlc { /* What's the status. */ diff --git a/channeld/full_channel.c b/channeld/full_channel.c index 699ccdf40..9bf383dbc 100644 --- a/channeld/full_channel.c +++ b/channeld/full_channel.c @@ -13,6 +13,7 @@ #include #include #include +#include #include /* Needs to be at end, since it doesn't include its own hdrs */ #include "full_channel_error_names_gen.h" diff --git a/channeld/inflight.h b/channeld/inflight.h index 7143e0ad9..025dc4502 100644 --- a/channeld/inflight.h +++ b/channeld/inflight.h @@ -3,6 +3,7 @@ #include "config.h" #include +#include #include #include diff --git a/channeld/test/run-commit_tx.c b/channeld/test/run-commit_tx.c index f2e0c8df0..b57e50a36 100644 --- a/channeld/test/run-commit_tx.c +++ b/channeld/test/run-commit_tx.c @@ -9,6 +9,7 @@ static bool print_superverbose; #define PRINT_ACTUAL_FEE #include "../commit_tx.c" #include +#include #include #include #include diff --git a/cli/config_cli.h b/cli/config_cli.h index 6faeb3606..5b0dcfd6c 100644 --- a/cli/config_cli.h +++ b/cli/config_cli.h @@ -2,7 +2,6 @@ #define LIGHTNING_CLI_CONFIG_CLI_H #include "config.h" -#include #ifndef CLN_TEST /* Redefinition procedure is a very cool feature, but diff --git a/cli/lightning-cli.c b/cli/lightning-cli.c index 10f8fffc2..8ebc25409 100644 --- a/cli/lightning-cli.c +++ b/cli/lightning-cli.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/closingd/closingd_wire.csv b/closingd/closingd_wire.csv index 10a5d8cbb..55ca55897 100644 --- a/closingd/closingd_wire.csv +++ b/closingd/closingd_wire.csv @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/common/amount.h b/common/amount.h index b1cdbac1d..11551b913 100644 --- a/common/amount.h +++ b/common/amount.h @@ -1,6 +1,7 @@ #ifndef LIGHTNING_COMMON_AMOUNT_H #define LIGHTNING_COMMON_AMOUNT_H #include "config.h" +#include #include #include diff --git a/common/autodata.h b/common/autodata.h index 60c300bab..6a18ffc25 100644 --- a/common/autodata.h +++ b/common/autodata.h @@ -1,8 +1,6 @@ #ifndef LIGHTNING_COMMON_AUTODATA_H #define LIGHTNING_COMMON_AUTODATA_H #include "config.h" -#include -#include #include #define AUTODATA_TYPE(name, type) \ diff --git a/common/blindedpath.c b/common/blindedpath.c index c13b49d9f..0923c40b3 100644 --- a/common/blindedpath.c +++ b/common/blindedpath.c @@ -1,13 +1,15 @@ #include "config.h" +#include #include #include #include #include #include #include +#include #include #include -#include +#include #ifndef SUPERVERBOSE #define SUPERVERBOSE(...) diff --git a/common/blindedpath.h b/common/blindedpath.h index b84869351..7a5238f15 100644 --- a/common/blindedpath.h +++ b/common/blindedpath.h @@ -1,7 +1,6 @@ #ifndef LIGHTNING_COMMON_BLINDEDPATH_H #define LIGHTNING_COMMON_BLINDEDPATH_H #include "config.h" -#include #include #include diff --git a/common/blindedpay.c b/common/blindedpay.c index 9c3dec2e7..1dc6f744a 100644 --- a/common/blindedpay.c +++ b/common/blindedpay.c @@ -3,6 +3,7 @@ #include #include #include +#include u8 **blinded_onion_hops(const tal_t *ctx, struct amount_msat final_amount, diff --git a/common/blindedpay.h b/common/blindedpay.h index fa99483aa..b455e38a1 100644 --- a/common/blindedpay.h +++ b/common/blindedpay.h @@ -2,7 +2,6 @@ #ifndef LIGHTNING_COMMON_BLINDEDPAY_H #define LIGHTNING_COMMON_BLINDEDPAY_H #include "config.h" -#include #include struct blinded_path; diff --git a/common/bolt12.c b/common/bolt12.c index f3bcbcdc1..8716807a9 100644 --- a/common/bolt12.c +++ b/common/bolt12.c @@ -9,9 +9,11 @@ #include #include #include +#include #include #include #include +#include /* If chains is NULL, max_num_chains is ignored */ bool bolt12_chains_match(const struct bitcoin_blkid *chains, diff --git a/common/bolt12_merkle.c b/common/bolt12_merkle.c index 6ca21896a..7f4e18580 100644 --- a/common/bolt12_merkle.c +++ b/common/bolt12_merkle.c @@ -5,6 +5,7 @@ #include #include #include +#include #ifndef SUPERVERBOSE #define SUPERVERBOSE(...) diff --git a/common/channel_type.c b/common/channel_type.c index 61302b45c..bae0d6b98 100644 --- a/common/channel_type.c +++ b/common/channel_type.c @@ -1,6 +1,7 @@ #include "config.h" #include #include +#include static struct channel_type *new_channel_type(const tal_t *ctx) { diff --git a/common/codex32.c b/common/codex32.c index f74587a63..6ccb0c495 100644 --- a/common/codex32.c +++ b/common/codex32.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include diff --git a/common/coin_mvt.c b/common/coin_mvt.c index 4e9ec871e..e797758e6 100644 --- a/common/coin_mvt.c +++ b/common/coin_mvt.c @@ -6,6 +6,7 @@ #include #include #include +#include #include static const char *mvt_tags[] = { diff --git a/common/coin_mvt.h b/common/coin_mvt.h index e9a41b325..822e6e821 100644 --- a/common/coin_mvt.h +++ b/common/coin_mvt.h @@ -3,9 +3,7 @@ #include "config.h" #include -#include #include -#include #define COIN_MVT_VERSION 2 #define ACCOUNT_NAME_WALLET "wallet" diff --git a/common/cryptomsg.c b/common/cryptomsg.c index f9ede9955..4225fefa8 100644 --- a/common/cryptomsg.c +++ b/common/cryptomsg.c @@ -1,5 +1,6 @@ #include "config.h" #include +#include #include #include #include diff --git a/common/cryptomsg.h b/common/cryptomsg.h index 3da33879c..d7c5634d0 100644 --- a/common/cryptomsg.h +++ b/common/cryptomsg.h @@ -1,7 +1,6 @@ #ifndef LIGHTNING_COMMON_CRYPTOMSG_H #define LIGHTNING_COMMON_CRYPTOMSG_H #include "config.h" -#include #include /* BOLT #8: diff --git a/common/decode_array.c b/common/decode_array.c index 0f9a8310b..83c7d7703 100644 --- a/common/decode_array.c +++ b/common/decode_array.c @@ -1,6 +1,7 @@ #include "config.h" #include #include +#include #include struct short_channel_id *decode_short_ids(const tal_t *ctx, const u8 *encoded) diff --git a/common/dijkstra.c b/common/dijkstra.c index afdc4d7be..d29173b61 100644 --- a/common/dijkstra.c +++ b/common/dijkstra.c @@ -7,6 +7,7 @@ #include #include #include +#include #include /* Each node has this side-info. */ diff --git a/common/ecdh_hsmd.c b/common/ecdh_hsmd.c index b8546ea99..5e186d51b 100644 --- a/common/ecdh_hsmd.c +++ b/common/ecdh_hsmd.c @@ -1,5 +1,7 @@ #include "config.h" +#include #include +#include #include #include diff --git a/common/ecdh_hsmd.h b/common/ecdh_hsmd.h index ca9288fbf..7c8aad5b2 100644 --- a/common/ecdh_hsmd.h +++ b/common/ecdh_hsmd.h @@ -1,7 +1,6 @@ #ifndef LIGHTNING_COMMON_ECDH_HSMD_H #define LIGHTNING_COMMON_ECDH_HSMD_H #include "config.h" -#include #include /* The via-the-hsmd implementation of ecdh(). */ diff --git a/common/errcode.h b/common/errcode.h index 9fcf6fbed..dc3560be5 100644 --- a/common/errcode.h +++ b/common/errcode.h @@ -3,7 +3,6 @@ #include "config.h" -#include // Setup errors #define EXITCODE_SUBDAEMON_FAIL 10 diff --git a/common/features.c b/common/features.c index 030068eb7..7573fea58 100644 --- a/common/features.c +++ b/common/features.c @@ -3,6 +3,7 @@ #include #include #include +#include #include enum feature_copy_style { diff --git a/common/gossip_constants.h b/common/gossip_constants.h index 53ed1cc84..d5a762312 100644 --- a/common/gossip_constants.h +++ b/common/gossip_constants.h @@ -1,7 +1,6 @@ #ifndef LIGHTNING_COMMON_GOSSIP_CONSTANTS_H #define LIGHTNING_COMMON_GOSSIP_CONSTANTS_H #include "config.h" -#include /* FIXME: This is a legacy concept, which should be eliminated now we have * only onion tlv payloads. */ diff --git a/common/gossmap.c b/common/gossmap.c index 1f3c5c017..a21a666f9 100644 --- a/common/gossmap.c +++ b/common/gossmap.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/common/gossmap.h b/common/gossmap.h index ef3b71a6d..1b60a1fdc 100644 --- a/common/gossmap.h +++ b/common/gossmap.h @@ -2,9 +2,6 @@ #define LIGHTNING_COMMON_GOSSMAP_H #include "config.h" #include -#include -#include -#include #include #include diff --git a/common/gossmods_listpeerchannels.h b/common/gossmods_listpeerchannels.h index f97694d68..8a62e77d1 100644 --- a/common/gossmods_listpeerchannels.h +++ b/common/gossmods_listpeerchannels.h @@ -2,7 +2,6 @@ #define LIGHTNING_COMMON_GOSSMODS_LISTPEERCHANNELS_H #include "config.h" #include -#include #include #include diff --git a/common/hsm_capable.c b/common/hsm_capable.c index a8187681c..5194ea1a2 100644 --- a/common/hsm_capable.c +++ b/common/hsm_capable.c @@ -1,4 +1,5 @@ #include "config.h" +#include #include /* Is this capability supported by the HSM? (So far, always a message diff --git a/common/hsm_capable.h b/common/hsm_capable.h index 82c9f00f1..d6d6ddb35 100644 --- a/common/hsm_capable.h +++ b/common/hsm_capable.h @@ -2,7 +2,6 @@ #define LIGHTNING_COMMON_HSM_CAPABLE_H #include "config.h" #include -#include #include /* Is this capability supported by the HSM? (So far, always a message diff --git a/common/hsm_encryption.c b/common/hsm_encryption.c index 33fc617f7..c8f316a31 100644 --- a/common/hsm_encryption.c +++ b/common/hsm_encryption.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #include diff --git a/common/hsm_encryption.h b/common/hsm_encryption.h index 0f1b36097..af67701ad 100644 --- a/common/hsm_encryption.h +++ b/common/hsm_encryption.h @@ -2,9 +2,7 @@ #define LIGHTNING_COMMON_HSM_ENCRYPTION_H #include "config.h" #include -#include #include -#include /* Length of the encrypted hsm secret header. */ #define HS_HEADER_LEN crypto_secretstream_xchacha20poly1305_HEADERBYTES diff --git a/common/htlc.h b/common/htlc.h index c300f0ffe..b933e07cd 100644 --- a/common/htlc.h +++ b/common/htlc.h @@ -3,7 +3,6 @@ #include "config.h" #include "bitcoin/locktime.h" #include "htlc_state.h" -#include #include #define NUM_SIDES (REMOTE + 1) diff --git a/common/htlc_tx.h b/common/htlc_tx.h index a08a90f8b..4e9f09a58 100644 --- a/common/htlc_tx.h +++ b/common/htlc_tx.h @@ -1,7 +1,6 @@ #ifndef LIGHTNING_COMMON_HTLC_TX_H #define LIGHTNING_COMMON_HTLC_TX_H #include "config.h" -#include #include #include #include diff --git a/common/htlc_wire.c b/common/htlc_wire.c index bb17e738b..3d94471ad 100644 --- a/common/htlc_wire.c +++ b/common/htlc_wire.c @@ -4,6 +4,7 @@ #include #include #include +#include #include static struct failed_htlc *failed_htlc_dup(const tal_t *ctx, diff --git a/common/initial_commit_tx.h b/common/initial_commit_tx.h index 6e715831b..7b61b7b8a 100644 --- a/common/initial_commit_tx.h +++ b/common/initial_commit_tx.h @@ -2,7 +2,6 @@ #ifndef LIGHTNING_COMMON_INITIAL_COMMIT_TX_H #define LIGHTNING_COMMON_INITIAL_COMMIT_TX_H #include "config.h" -#include #include #include #include diff --git a/common/interactivetx.c b/common/interactivetx.c index 6e1aa1c91..2e9a659ae 100644 --- a/common/interactivetx.c +++ b/common/interactivetx.c @@ -21,7 +21,9 @@ #include #include #include +#include #include +#include #ifndef SUPERVERBOSE #define SUPERVERBOSE(...) diff --git a/common/interactivetx.h b/common/interactivetx.h index af17e1453..967bb167b 100644 --- a/common/interactivetx.h +++ b/common/interactivetx.h @@ -2,12 +2,8 @@ #define LIGHTNING_COMMON_INTERACTIVETX_H #include "config.h" -#include #include -#include #include -#include -#include /* Interactive tx handles the building and updating of a transaction between * two peers. A PSBT is passed back and forth between two peers in steps. In diff --git a/common/json_blinded_path.c b/common/json_blinded_path.c index 78ef625e6..2df745e1d 100644 --- a/common/json_blinded_path.c +++ b/common/json_blinded_path.c @@ -1,7 +1,9 @@ #include "config.h" +#include #include #include -#include +#include +#include struct blinded_path * json_to_blinded_path(const tal_t *ctx, const char *buffer, const jsmntok_t *tok) diff --git a/common/json_command.h b/common/json_command.h index d0c0667f4..7b77cc8e7 100644 --- a/common/json_command.h +++ b/common/json_command.h @@ -3,9 +3,7 @@ #ifndef LIGHTNING_COMMON_JSON_COMMAND_H #define LIGHTNING_COMMON_JSON_COMMAND_H #include "config.h" -#include #include -#include #include struct command; diff --git a/common/json_filter.h b/common/json_filter.h index dee177aeb..3e9116df9 100644 --- a/common/json_filter.h +++ b/common/json_filter.h @@ -4,9 +4,7 @@ #ifndef LIGHTNING_COMMON_JSON_FILTER_H #define LIGHTNING_COMMON_JSON_FILTER_H #include "config.h" -#include #include -#include struct command; struct json_filter; diff --git a/common/json_param.c b/common/json_param.c index c92de191a..9323b0385 100644 --- a/common/json_param.c +++ b/common/json_param.c @@ -14,6 +14,7 @@ #include #include #include +#include /* Overridden by run-param.c */ #ifndef paramcheck_assert diff --git a/common/json_param.h b/common/json_param.h index e41528a20..a000c71b1 100644 --- a/common/json_param.h +++ b/common/json_param.h @@ -2,13 +2,10 @@ #ifndef LIGHTNING_COMMON_JSON_PARAM_H #define LIGHTNING_COMMON_JSON_PARAM_H #include "config.h" -#include #include #include #include -#include #include -#include /*~ Greetings adventurer! * diff --git a/common/json_parse.c b/common/json_parse.c index 260e9e1b5..2e4bc9ef1 100644 --- a/common/json_parse.c +++ b/common/json_parse.c @@ -20,7 +20,6 @@ #include #include #include -#include bool json_to_millionths(const char *buffer, const jsmntok_t *tok, u64 *millionths) diff --git a/common/json_parse.h b/common/json_parse.h index 4bd23cbdd..8f3bcfc32 100644 --- a/common/json_parse.h +++ b/common/json_parse.h @@ -2,9 +2,7 @@ #define LIGHTNING_COMMON_JSON_PARSE_H #include "config.h" #include -#include #include -#include /* Simple helpers are here: this file contains heavier ones */ #include #include diff --git a/common/json_parse_simple.c b/common/json_parse_simple.c index e3b2cba82..521b73723 100644 --- a/common/json_parse_simple.c +++ b/common/json_parse_simple.c @@ -8,7 +8,6 @@ #include #include #include -#include const char *json_tok_full(const char *buffer, const jsmntok_t *t) { diff --git a/common/json_stream.h b/common/json_stream.h index bfbb5d0a7..da65761c8 100644 --- a/common/json_stream.h +++ b/common/json_stream.h @@ -9,8 +9,6 @@ # include #include -#include -#include #include #include #include diff --git a/common/jsonrpc_errors.h b/common/jsonrpc_errors.h index da9e33772..48ff07884 100644 --- a/common/jsonrpc_errors.h +++ b/common/jsonrpc_errors.h @@ -6,7 +6,6 @@ #include "config.h" -#include enum jsonrpc_errcode { /* Standard errors defined by JSON-RPC 2.0 standard */ diff --git a/common/key_derive.h b/common/key_derive.h index b078cc926..8ea5419d3 100644 --- a/common/key_derive.h +++ b/common/key_derive.h @@ -1,7 +1,6 @@ #ifndef LIGHTNING_COMMON_KEY_DERIVE_H #define LIGHTNING_COMMON_KEY_DERIVE_H #include "config.h" -#include #include struct pubkey; diff --git a/common/lease_rates.c b/common/lease_rates.c index 403804e92..7bcb3ce0c 100644 --- a/common/lease_rates.c +++ b/common/lease_rates.c @@ -2,6 +2,7 @@ #include #include #include +#include bool lease_rates_empty(const struct lease_rates *rates) { diff --git a/common/lease_rates.h b/common/lease_rates.h index 0b87b38e3..3651f9555 100644 --- a/common/lease_rates.h +++ b/common/lease_rates.h @@ -1,7 +1,6 @@ #ifndef LIGHTNING_COMMON_LEASE_RATES_H #define LIGHTNING_COMMON_LEASE_RATES_H #include "config.h" -#include #include struct amount_msat; diff --git a/common/memleak.h b/common/memleak.h index a15413b23..0ff2dc5af 100644 --- a/common/memleak.h +++ b/common/memleak.h @@ -3,8 +3,6 @@ #include "config.h" #include #include -#include -#include struct htable; struct list_head; diff --git a/common/node_id.h b/common/node_id.h index fa4779c1a..0f943a44a 100644 --- a/common/node_id.h +++ b/common/node_id.h @@ -4,7 +4,6 @@ #include "config.h" #include #include -#include #include struct sha256_double; diff --git a/common/onion_decode.c b/common/onion_decode.c index d1bc9b0bd..e82b8a956 100644 --- a/common/onion_decode.c +++ b/common/onion_decode.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include diff --git a/common/onion_decode.h b/common/onion_decode.h index c1149972b..f1d637fc6 100644 --- a/common/onion_decode.h +++ b/common/onion_decode.h @@ -1,8 +1,6 @@ #ifndef LIGHTNING_COMMON_ONION_DECODE_H #define LIGHTNING_COMMON_ONION_DECODE_H #include "config.h" -#include -#include #include /** diff --git a/common/onion_encode.c b/common/onion_encode.c index ee9747189..e5ff5d997 100644 --- a/common/onion_encode.c +++ b/common/onion_encode.c @@ -7,6 +7,7 @@ #include #include #include +#include #include /* BOLT #4: diff --git a/common/onion_message.c b/common/onion_message.c index c781866ee..e887d42aa 100644 --- a/common/onion_message.c +++ b/common/onion_message.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include struct tlv_encrypted_data_tlv **new_encdata_tlvs(const tal_t *ctx, const struct pubkey *ids, diff --git a/common/onion_message.h b/common/onion_message.h index 03139828d..e5da47d49 100644 --- a/common/onion_message.h +++ b/common/onion_message.h @@ -1,7 +1,6 @@ #ifndef LIGHTNING_COMMON_ONION_MESSAGE_H #define LIGHTNING_COMMON_ONION_MESSAGE_H #include "config.h" -#include #include #include diff --git a/common/onion_message_parse.c b/common/onion_message_parse.c index 9becf60d1..c2184dbd7 100644 --- a/common/onion_message_parse.c +++ b/common/onion_message_parse.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include static bool decrypt_final_onionmsg(const tal_t *ctx, diff --git a/common/onion_message_parse.h b/common/onion_message_parse.h index af4c51908..6cc1b126a 100644 --- a/common/onion_message_parse.h +++ b/common/onion_message_parse.h @@ -2,7 +2,6 @@ #define LIGHTNING_COMMON_ONION_MESSAGE_PARSE_H #include "config.h" #include -#include struct tlv_onionmsg_tlv; struct sciddir_or_pubkey; diff --git a/common/peer_failed.c b/common/peer_failed.c index f21754e3a..e9864e363 100644 --- a/common/peer_failed.c +++ b/common/peer_failed.c @@ -8,6 +8,7 @@ #include #include #include +#include #include /* Fatal error here, return peer control to lightningd */ diff --git a/common/per_peer_state.h b/common/per_peer_state.h index 0561d8ce2..23dce6833 100644 --- a/common/per_peer_state.h +++ b/common/per_peer_state.h @@ -2,8 +2,6 @@ #define LIGHTNING_COMMON_PER_PEER_STATE_H #include "config.h" -#include -#include #include /* Things we hand between daemons to talk to peers. */ diff --git a/common/psbt_internal.c b/common/psbt_internal.c index 44501d6df..55c50e54a 100644 --- a/common/psbt_internal.c +++ b/common/psbt_internal.c @@ -5,6 +5,7 @@ #include #include #include +#include #include diff --git a/common/psbt_open.h b/common/psbt_open.h index b3c74c92a..da0d30d42 100644 --- a/common/psbt_open.h +++ b/common/psbt_open.h @@ -1,7 +1,6 @@ #ifndef LIGHTNING_COMMON_PSBT_OPEN_H #define LIGHTNING_COMMON_PSBT_OPEN_H #include "config.h" -#include #include #include #include diff --git a/common/pseudorand.c b/common/pseudorand.c index 831be2bb5..a9c5dfa82 100644 --- a/common/pseudorand.c +++ b/common/pseudorand.c @@ -1,7 +1,6 @@ #include "config.h" #include #include -#include #include #include #include diff --git a/common/pseudorand.h b/common/pseudorand.h index a34220055..ebe9e0b59 100644 --- a/common/pseudorand.h +++ b/common/pseudorand.h @@ -1,6 +1,7 @@ #ifndef LIGHTNING_COMMON_PSEUDORAND_H #define LIGHTNING_COMMON_PSEUDORAND_H #include "config.h" +#include #include #include diff --git a/common/read_peer_msg.c b/common/read_peer_msg.c index b10de75e1..a371cf952 100644 --- a/common/read_peer_msg.c +++ b/common/read_peer_msg.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/common/scb_wire.csv b/common/scb_wire.csv index f955b6bca..537c564ca 100644 --- a/common/scb_wire.csv +++ b/common/scb_wire.csv @@ -7,6 +7,7 @@ #include #include #include +#include tlvtype,scb_tlvs,shachain,1, tlvdata,scb_tlvs,shachain,their_shachain,shachain, diff --git a/common/shutdown_scriptpubkey.c b/common/shutdown_scriptpubkey.c index 05d7b22e9..6c82baf26 100644 --- a/common/shutdown_scriptpubkey.c +++ b/common/shutdown_scriptpubkey.c @@ -1,6 +1,7 @@ #include "config.h" #include #include +#include #include /* BOLT #2: diff --git a/common/sphinx.c b/common/sphinx.c index c254e6317..e44055022 100644 --- a/common/sphinx.c +++ b/common/sphinx.c @@ -7,7 +7,7 @@ #include #include #include - +#include #include diff --git a/common/sphinx.h b/common/sphinx.h index 933e82627..b559d61a8 100644 --- a/common/sphinx.h +++ b/common/sphinx.h @@ -6,7 +6,7 @@ #include "bitcoin/pubkey.h" #include -#include +#include struct node_id; diff --git a/common/splice_script.h b/common/splice_script.h index 17b3de289..fd2c9b07b 100644 --- a/common/splice_script.h +++ b/common/splice_script.h @@ -2,7 +2,6 @@ #define LIGHTNING_COMMON_SPLICE_SCRIPT_H #include "config.h" -#include #include #include #include diff --git a/common/status.c b/common/status.c index 87a554003..7de0ebdfa 100644 --- a/common/status.c +++ b/common/status.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/common/test/run-bolt12-format-string-test.c b/common/test/run-bolt12-format-string-test.c index dc8384750..e120af65f 100644 --- a/common/test/run-bolt12-format-string-test.c +++ b/common/test/run-bolt12-format-string-test.c @@ -9,6 +9,7 @@ #include #include #include +#include /* AUTOGENERATED MOCKS START */ /* Generated stub for features_unsupported */ diff --git a/common/test/run-bolt12_merkle-json.c b/common/test/run-bolt12_merkle-json.c index 4c0910d3f..dba66a295 100644 --- a/common/test/run-bolt12_merkle-json.c +++ b/common/test/run-bolt12_merkle-json.c @@ -8,6 +8,7 @@ #include "../../wire/fromwire.c" #include "../../wire/peer_wiregen.c" #include "../../wire/tlvstream.c" +#include #include #include #include diff --git a/common/test/run-cryptomsg.c b/common/test/run-cryptomsg.c index 42fa16e89..9b7619d95 100644 --- a/common/test/run-cryptomsg.c +++ b/common/test/run-cryptomsg.c @@ -2,6 +2,7 @@ #include #include #include +#include #include #include diff --git a/common/test/run-json.c b/common/test/run-json.c index b5fdecdb3..529d96c62 100644 --- a/common/test/run-json.c +++ b/common/test/run-json.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include diff --git a/common/trace.c b/common/trace.c index eade3171f..a91adf2b3 100644 --- a/common/trace.c +++ b/common/trace.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include diff --git a/common/utils.h b/common/utils.h index 26992fdb0..45b91f87f 100644 --- a/common/utils.h +++ b/common/utils.h @@ -1,7 +1,6 @@ #ifndef LIGHTNING_COMMON_UTILS_H #define LIGHTNING_COMMON_UTILS_H #include "config.h" -#include #include #include #include diff --git a/common/wire_error.c b/common/wire_error.c index 512a1cf6b..bf8217600 100644 --- a/common/wire_error.c +++ b/common/wire_error.c @@ -1,6 +1,7 @@ #include "config.h" #include #include +#include #include #include diff --git a/connectd/connectd.c b/connectd/connectd.c index f04f2caa7..17ec7d3a3 100644 --- a/connectd/connectd.c +++ b/connectd/connectd.c @@ -19,8 +19,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -29,6 +31,7 @@ #include #include #include +#include #include #include #include diff --git a/connectd/connectd.h b/connectd/connectd.h index 5774c220f..09778e2d5 100644 --- a/connectd/connectd.h +++ b/connectd/connectd.h @@ -1,16 +1,12 @@ #ifndef LIGHTNING_CONNECTD_CONNECTD_H #define LIGHTNING_CONNECTD_CONNECTD_H #include "config.h" -#include #include -#include #include #include #include -#include #include #include -#include #include #include diff --git a/connectd/connectd_gossipd_wire.csv b/connectd/connectd_gossipd_wire.csv index 195a73421..d6be886a6 100644 --- a/connectd/connectd_gossipd_wire.csv +++ b/connectd/connectd_gossipd_wire.csv @@ -1,6 +1,4 @@ #include -#include -#include # Communication between gossipd and connectd. msgtype,gossipd_new_peer,4000 diff --git a/connectd/connectd_wire.csv b/connectd/connectd_wire.csv index 23b7d37da..78df85efc 100644 --- a/connectd/connectd_wire.csv +++ b/connectd/connectd_wire.csv @@ -1,10 +1,8 @@ -#include #include -#include #include #include #include -#include +#include msgtype,connectd_init,2000 msgdata,connectd_init,chainparams,chainparams, diff --git a/connectd/gossip_store.c b/connectd/gossip_store.c index 7a6bb61dc..60da90f30 100644 --- a/connectd/gossip_store.c +++ b/connectd/gossip_store.c @@ -1,6 +1,7 @@ #include "config.h" #include #include +#include #include #include #include diff --git a/connectd/multiplex.c b/connectd/multiplex.c index d2c725355..77cdfd50a 100644 --- a/connectd/multiplex.c +++ b/connectd/multiplex.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include diff --git a/connectd/onion_message.c b/connectd/onion_message.c index 09940e855..1a9b42b0f 100644 --- a/connectd/onion_message.c +++ b/connectd/onion_message.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/connectd/peer_exchange_initmsg.c b/connectd/peer_exchange_initmsg.c index b0a29549c..de43633fa 100644 --- a/connectd/peer_exchange_initmsg.c +++ b/connectd/peer_exchange_initmsg.c @@ -1,9 +1,11 @@ #include "config.h" #include #include +#include #include #include #include +#include #include #include #include diff --git a/connectd/queries.c b/connectd/queries.c index 3a680cb75..351c46939 100644 --- a/connectd/queries.c +++ b/connectd/queries.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/db/common.h b/db/common.h index 1ffd26344..829a3d2cf 100644 --- a/db/common.h +++ b/db/common.h @@ -2,11 +2,8 @@ #define LIGHTNING_DB_COMMON_H #include "config.h" #include -#include -#include #include #include -#include /** * Macro to annotate a named SQL query. diff --git a/db/utils.c b/db/utils.c index 155efbd44..3b896f9c7 100644 --- a/db/utils.c +++ b/db/utils.c @@ -1,4 +1,5 @@ #include "config.h" +#include #include #include #include diff --git a/devtools/bolt11-cli.c b/devtools/bolt11-cli.c index 5553822c6..02204fb15 100644 --- a/devtools/bolt11-cli.c +++ b/devtools/bolt11-cli.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/devtools/bolt12-cli.c b/devtools/bolt12-cli.c index 830d2744a..0aa6adc85 100644 --- a/devtools/bolt12-cli.c +++ b/devtools/bolt12-cli.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/devtools/checkchannels.c b/devtools/checkchannels.c index bf7746d08..235b11096 100644 --- a/devtools/checkchannels.c +++ b/devtools/checkchannels.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include diff --git a/devtools/convert-gossmap.c b/devtools/convert-gossmap.c index dee2b1f1e..96ea79563 100644 --- a/devtools/convert-gossmap.c +++ b/devtools/convert-gossmap.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include diff --git a/devtools/create-gossipstore.c b/devtools/create-gossipstore.c index b9376f474..320ad9f37 100644 --- a/devtools/create-gossipstore.c +++ b/devtools/create-gossipstore.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include diff --git a/devtools/decodemsg.c b/devtools/decodemsg.c index 2a5d05c7e..390a40930 100644 --- a/devtools/decodemsg.c +++ b/devtools/decodemsg.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include diff --git a/devtools/dump-gossipstore.c b/devtools/dump-gossipstore.c index ced6a5a06..2d69b0637 100644 --- a/devtools/dump-gossipstore.c +++ b/devtools/dump-gossipstore.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include diff --git a/devtools/gossipwith.c b/devtools/gossipwith.c index f506787cd..254e61943 100644 --- a/devtools/gossipwith.c +++ b/devtools/gossipwith.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/devtools/gossmap-compress.c b/devtools/gossmap-compress.c index 0847fc1bf..58ef255ac 100644 --- a/devtools/gossmap-compress.c +++ b/devtools/gossmap-compress.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/devtools/mkcommit.c b/devtools/mkcommit.c index 069282b2f..3cfe80ba2 100644 --- a/devtools/mkcommit.c +++ b/devtools/mkcommit.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/devtools/mkencoded.c b/devtools/mkencoded.c index 6ff556be9..ba6f40db1 100644 --- a/devtools/mkencoded.c +++ b/devtools/mkencoded.c @@ -4,6 +4,7 @@ #include #include #include +#include #include static NORETURN void usage(void) diff --git a/devtools/mkgossip.c b/devtools/mkgossip.c index 374b91427..b68d8cfe6 100644 --- a/devtools/mkgossip.c +++ b/devtools/mkgossip.c @@ -8,11 +8,13 @@ */ #include "config.h" #include +#include #include #include #include #include #include +#include #include #include #include diff --git a/devtools/mkquery.c b/devtools/mkquery.c index 3bb4cef7a..9fe6e69f8 100644 --- a/devtools/mkquery.c +++ b/devtools/mkquery.c @@ -2,6 +2,7 @@ #include "config.h" #include #include +#include #include #include diff --git a/devtools/onion.c b/devtools/onion.c index ca723afd5..ee2f53138 100644 --- a/devtools/onion.c +++ b/devtools/onion.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include diff --git a/devtools/print_wire.c b/devtools/print_wire.c index 15669899d..ba1285fff 100644 --- a/devtools/print_wire.c +++ b/devtools/print_wire.c @@ -1,8 +1,13 @@ #include "config.h" +#include +#include +#include #include #include +#include #include #include +#include #include #include #include diff --git a/devtools/print_wire.h b/devtools/print_wire.h index 40c86d235..0a2a13797 100644 --- a/devtools/print_wire.h +++ b/devtools/print_wire.h @@ -1,11 +1,7 @@ #ifndef LIGHTNING_DEVTOOLS_PRINT_WIRE_H #define LIGHTNING_DEVTOOLS_PRINT_WIRE_H #include "config.h" -#include -#include -#include -#include -#include +#include struct tlv_print_record_type { u64 type; diff --git a/devtools/route.c b/devtools/route.c index 684d04cb7..d13e3cf9d 100644 --- a/devtools/route.c +++ b/devtools/route.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/devtools/topology.c b/devtools/topology.c index 649e66953..181809d22 100644 --- a/devtools/topology.c +++ b/devtools/topology.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/gossipd/gossip_store.c b/gossipd/gossip_store.c index 15cae6bde..4d4907777 100644 --- a/gossipd/gossip_store.c +++ b/gossipd/gossip_store.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/gossipd/gossip_store.h b/gossipd/gossip_store.h index 96ff0937f..853b772d7 100644 --- a/gossipd/gossip_store.h +++ b/gossipd/gossip_store.h @@ -4,9 +4,6 @@ #include "config.h" #include -#include -#include -#include /** * gossip_store -- On-disk storage related information diff --git a/gossipd/gossipd.c b/gossipd/gossipd.c index 418070508..14b795fd2 100644 --- a/gossipd/gossipd.c +++ b/gossipd/gossipd.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include diff --git a/gossipd/gossipd.h b/gossipd/gossipd.h index 831815634..9ee193e55 100644 --- a/gossipd/gossipd.h +++ b/gossipd/gossipd.h @@ -2,6 +2,7 @@ #define LIGHTNING_GOSSIPD_GOSSIPD_H #include "config.h" #include +#include #include #include #include diff --git a/gossipd/gossipd_wire.csv b/gossipd/gossipd_wire.csv index d8bee4b29..c5868eb74 100644 --- a/gossipd/gossipd_wire.csv +++ b/gossipd/gossipd_wire.csv @@ -2,7 +2,7 @@ #include #include #include -#include +#include # Initialize the gossip daemon. msgtype,gossipd_init,3000 diff --git a/gossipd/gossmap_manage.c b/gossipd/gossmap_manage.c index 816c3f00e..72c94f3b2 100644 --- a/gossipd/gossmap_manage.c +++ b/gossipd/gossmap_manage.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/gossipd/queries.c b/gossipd/queries.c index 707933fac..8902a5fc9 100644 --- a/gossipd/queries.c +++ b/gossipd/queries.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/gossipd/seeker.c b/gossipd/seeker.c index 414aa3e73..b822cb732 100644 --- a/gossipd/seeker.c +++ b/gossipd/seeker.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/hsmd/hsm_utxo.h b/hsmd/hsm_utxo.h index 62bea0026..b7d8d7182 100644 --- a/hsmd/hsm_utxo.h +++ b/hsmd/hsm_utxo.h @@ -1,8 +1,6 @@ #ifndef LIGHTNING_HSMD_HSM_UTXO_H #define LIGHTNING_HSMD_HSM_UTXO_H #include "config.h" -#include -#include #include /* FIXME: If we make our static_remotekey a normal keypath key, we can diff --git a/hsmd/hsmd.c b/hsmd/hsmd.c index ff6d1e7b2..2d05e657e 100644 --- a/hsmd/hsmd.c +++ b/hsmd/hsmd.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include /*~ _wiregen files are autogenerated by tools/generate-wire.py */ diff --git a/hsmd/hsmd_wire.csv b/hsmd/hsmd_wire.csv index 4a8c7c7d9..4f4a40d1e 100644 --- a/hsmd/hsmd_wire.csv +++ b/hsmd/hsmd_wire.csv @@ -392,6 +392,7 @@ msgdata,hsmd_sign_bolt12,merkleroot,sha256, msgdata,hsmd_sign_bolt12,publictweaklen,u16, msgdata,hsmd_sign_bolt12,publictweak,u8,publictweaklen +#include msgtype,hsmd_sign_bolt12_reply,125 msgdata,hsmd_sign_bolt12_reply,sig,bip340sig, diff --git a/hsmd/libhsmd.c b/hsmd/libhsmd.c index 7e51fd85d..f459f03f1 100644 --- a/hsmd/libhsmd.c +++ b/hsmd/libhsmd.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/hsmd/libhsmd.h b/hsmd/libhsmd.h index db927284b..652340e21 100644 --- a/hsmd/libhsmd.h +++ b/hsmd/libhsmd.h @@ -2,7 +2,6 @@ #define LIGHTNING_HSMD_LIBHSMD_H #include "config.h" -#include #include #include diff --git a/lightningd/bitcoind.h b/lightningd/bitcoind.h index cf92e9075..3daa50905 100644 --- a/lightningd/bitcoind.h +++ b/lightningd/bitcoind.h @@ -1,7 +1,6 @@ #ifndef LIGHTNING_LIGHTNINGD_BITCOIND_H #define LIGHTNING_LIGHTNINGD_BITCOIND_H #include "config.h" -#include #include #include #include diff --git a/lightningd/chaintopology.c b/lightningd/chaintopology.c index 59f004f73..1baab407f 100644 --- a/lightningd/chaintopology.c +++ b/lightningd/chaintopology.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/lightningd/chaintopology.h b/lightningd/chaintopology.h index 4f80d2162..f6aa81887 100644 --- a/lightningd/chaintopology.h +++ b/lightningd/chaintopology.h @@ -1,9 +1,6 @@ #ifndef LIGHTNING_LIGHTNINGD_CHAINTOPOLOGY_H #define LIGHTNING_LIGHTNINGD_CHAINTOPOLOGY_H #include "config.h" -#include -#include -#include #include struct bitcoin_tx; diff --git a/lightningd/channel.h b/lightningd/channel.h index fd8e031b0..3606d0f98 100644 --- a/lightningd/channel.h +++ b/lightningd/channel.h @@ -1,6 +1,7 @@ #ifndef LIGHTNING_LIGHTNINGD_CHANNEL_H #define LIGHTNING_LIGHTNINGD_CHANNEL_H #include "config.h" +#include #include #include #include diff --git a/lightningd/channel_control.c b/lightningd/channel_control.c index a72f95983..93d76a7ad 100644 --- a/lightningd/channel_control.c +++ b/lightningd/channel_control.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/lightningd/channel_state.h b/lightningd/channel_state.h index 26d12d81d..9db105fb1 100644 --- a/lightningd/channel_state.h +++ b/lightningd/channel_state.h @@ -2,7 +2,6 @@ #define LIGHTNING_LIGHTNINGD_CHANNEL_STATE_H #include "config.h" -#include /* These are in the database, so don't renumber them! */ enum channel_state { diff --git a/lightningd/closing_control.c b/lightningd/closing_control.c index 36fe90f69..dbf604bc4 100644 --- a/lightningd/closing_control.c +++ b/lightningd/closing_control.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/lightningd/connect_control.c b/lightningd/connect_control.c index 2cdeb610b..437beaa9e 100644 --- a/lightningd/connect_control.c +++ b/lightningd/connect_control.c @@ -1,6 +1,7 @@ #include "config.h" #include #include +#include #include #include #include diff --git a/lightningd/dual_open_control.c b/lightningd/dual_open_control.c index ab84e3f49..8e6a65169 100644 --- a/lightningd/dual_open_control.c +++ b/lightningd/dual_open_control.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include diff --git a/lightningd/forwards.h b/lightningd/forwards.h index f65dd1687..0436035b1 100644 --- a/lightningd/forwards.h +++ b/lightningd/forwards.h @@ -2,7 +2,8 @@ #ifndef LIGHTNING_LIGHTNINGD_FORWARDS_H #define LIGHTNING_LIGHTNINGD_FORWARDS_H #include "config.h" -#include +#include +#include struct json_stream; struct lightningd; diff --git a/lightningd/gossip_control.c b/lightningd/gossip_control.c index 4e931a784..207e41b57 100644 --- a/lightningd/gossip_control.c +++ b/lightningd/gossip_control.c @@ -1,5 +1,6 @@ #include "config.h" #include +#include #include #include #include diff --git a/lightningd/gossip_control.h b/lightningd/gossip_control.h index 06a248799..49baa7fff 100644 --- a/lightningd/gossip_control.h +++ b/lightningd/gossip_control.h @@ -2,8 +2,6 @@ #define LIGHTNING_LIGHTNINGD_GOSSIP_CONTROL_H #include "config.h" #include -#include -#include struct channel; struct lightningd; diff --git a/lightningd/htlc_end.c b/lightningd/htlc_end.c index 91d66b0c3..b55780874 100644 --- a/lightningd/htlc_end.c +++ b/lightningd/htlc_end.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include diff --git a/lightningd/htlc_set.h b/lightningd/htlc_set.h index c93ca1536..bb0119dc3 100644 --- a/lightningd/htlc_set.h +++ b/lightningd/htlc_set.h @@ -7,7 +7,6 @@ #include #include #include -#include struct lightningd; struct logger; diff --git a/lightningd/invoice.h b/lightningd/invoice.h index 90c31cb27..43e98b2a1 100644 --- a/lightningd/invoice.h +++ b/lightningd/invoice.h @@ -2,7 +2,6 @@ #define LIGHTNING_LIGHTNINGD_INVOICE_H #include "config.h" #include -#include struct amount_msat; struct htlc_set; diff --git a/lightningd/lightningd.c b/lightningd/lightningd.c index 5a350daeb..7044d9796 100644 --- a/lightningd/lightningd.c +++ b/lightningd/lightningd.c @@ -37,6 +37,7 @@ */ #include #include +#include #include #include #include @@ -51,6 +52,7 @@ #include #include #include +#include #include #include #include diff --git a/lightningd/opening_common.h b/lightningd/opening_common.h index 8b75b56a0..21ca82286 100644 --- a/lightningd/opening_common.h +++ b/lightningd/opening_common.h @@ -1,8 +1,6 @@ #ifndef LIGHTNING_LIGHTNINGD_OPENING_COMMON_H #define LIGHTNING_LIGHTNINGD_OPENING_COMMON_H #include "config.h" -#include -#include #include #include #include diff --git a/lightningd/opening_control.c b/lightningd/opening_control.c index 7c12a0ffd..ffd6cab56 100644 --- a/lightningd/opening_control.c +++ b/lightningd/opening_control.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/lightningd/options.c b/lightningd/options.c index e565c62f9..5f84b7285 100644 --- a/lightningd/options.c +++ b/lightningd/options.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -26,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/lightningd/peer_control.c b/lightningd/peer_control.c index fa458cb2b..98f596b2e 100644 --- a/lightningd/peer_control.c +++ b/lightningd/peer_control.c @@ -71,7 +71,6 @@ #include #include #include -#include #include /* FIXME: Reorder! */ diff --git a/lightningd/peer_fd.h b/lightningd/peer_fd.h index a6e1f011f..89041260e 100644 --- a/lightningd/peer_fd.h +++ b/lightningd/peer_fd.h @@ -1,7 +1,6 @@ #ifndef LIGHTNING_LIGHTNINGD_PEER_FD_H #define LIGHTNING_LIGHTNINGD_PEER_FD_H #include "config.h" -#include #include /* Tal wrapper for fd connecting subd to connectd */ diff --git a/lightningd/runes.c b/lightningd/runes.c index 77be7a30a..908549783 100644 --- a/lightningd/runes.c +++ b/lightningd/runes.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/lightningd/subd.c b/lightningd/subd.c index 263ce03c6..c3f59f01b 100644 --- a/lightningd/subd.c +++ b/lightningd/subd.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/lightningd/subd.h b/lightningd/subd.h index c572a77d0..8518b0655 100644 --- a/lightningd/subd.h +++ b/lightningd/subd.h @@ -1,12 +1,7 @@ #ifndef LIGHTNING_LIGHTNINGD_SUBD_H #define LIGHTNING_LIGHTNINGD_SUBD_H #include "config.h" -#include #include -#include -#include -#include -#include #include struct crypto_state; diff --git a/onchaind/onchaind.c b/onchaind/onchaind.c index 0fbc8666f..024aaf4a0 100644 --- a/onchaind/onchaind.c +++ b/onchaind/onchaind.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/onchaind/onchaind_wire.csv b/onchaind/onchaind_wire.csv index f8f5e8eab..3c9c76bba 100644 --- a/onchaind/onchaind_wire.csv +++ b/onchaind/onchaind_wire.csv @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/openingd/common.h b/openingd/common.h index aab8bd848..346449485 100644 --- a/openingd/common.h +++ b/openingd/common.h @@ -2,6 +2,7 @@ #define LIGHTNING_OPENINGD_COMMON_H #include "config.h" +#include struct amount_sat; struct bitcoin_tx; diff --git a/openingd/dualopend.c b/openingd/dualopend.c index 8e902fa59..eeca9056a 100644 --- a/openingd/dualopend.c +++ b/openingd/dualopend.c @@ -38,9 +38,11 @@ #include #include #include +#include #include #include #include +#include #include /* stdin == lightningd, 3 == peer, 4 = hsmd */ diff --git a/openingd/dualopend_wire.csv b/openingd/dualopend_wire.csv index 34841392f..d6b157495 100644 --- a/openingd/dualopend_wire.csv +++ b/openingd/dualopend_wire.csv @@ -1,5 +1,6 @@ #include #include +#include #include #include #include diff --git a/openingd/openingd_wire.csv b/openingd/openingd_wire.csv index c70de6cf0..f96c50b00 100644 --- a/openingd/openingd_wire.csv +++ b/openingd/openingd_wire.csv @@ -1,4 +1,5 @@ #include +#include #include #include #include diff --git a/plugins/askrene/askrene.c b/plugins/askrene/askrene.c index 9664d2487..fff49c054 100644 --- a/plugins/askrene/askrene.c +++ b/plugins/askrene/askrene.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/plugins/askrene/mcf.c b/plugins/askrene/mcf.c index 4614fb49c..8d69511eb 100644 --- a/plugins/askrene/mcf.c +++ b/plugins/askrene/mcf.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/plugins/askrene/reserve.c b/plugins/askrene/reserve.c index abec9372d..59457fc24 100644 --- a/plugins/askrene/reserve.c +++ b/plugins/askrene/reserve.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include diff --git a/plugins/autoclean.c b/plugins/autoclean.c index bfd358c98..8be8ce2b6 100644 --- a/plugins/autoclean.c +++ b/plugins/autoclean.c @@ -6,6 +6,7 @@ #include #include #include +#include #include static u64 cycle_seconds = 3600; diff --git a/plugins/bcli.c b/plugins/bcli.c index fdd5a7c6e..b1e655b99 100644 --- a/plugins/bcli.c +++ b/plugins/bcli.c @@ -11,6 +11,7 @@ #include #include #include +#include #include /* Bitcoind's web server has a default of 4 threads, with queue depth 16. diff --git a/plugins/bkpr/bookkeeper.c b/plugins/bkpr/bookkeeper.c index 75fb76ad5..93f44e5c2 100644 --- a/plugins/bkpr/bookkeeper.c +++ b/plugins/bkpr/bookkeeper.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/plugins/bkpr/rebalances.c b/plugins/bkpr/rebalances.c index 38bbdcd84..91d9dd6f9 100644 --- a/plugins/bkpr/rebalances.c +++ b/plugins/bkpr/rebalances.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/plugins/chanbackup.c b/plugins/chanbackup.c index 11091edd9..034c3ecff 100644 --- a/plugins/chanbackup.c +++ b/plugins/chanbackup.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/plugins/channel_hint.c b/plugins/channel_hint.c index 1db37791e..cf431cb85 100644 --- a/plugins/channel_hint.c +++ b/plugins/channel_hint.c @@ -1,4 +1,5 @@ #include "config.h" +#include #include #include diff --git a/plugins/channel_hint.h b/plugins/channel_hint.h index 200458f82..db94c5b3e 100644 --- a/plugins/channel_hint.h +++ b/plugins/channel_hint.h @@ -2,11 +2,6 @@ #define LIGHTNING_PLUGINS_CHANNEL_HINT_H #include "config.h" -#include -#include -#include -#include -#include #include /* Information about channels we inferred from a) looking at our channels, and diff --git a/plugins/commando.c b/plugins/commando.c index 608e8dfe9..ae23d7a62 100644 --- a/plugins/commando.c +++ b/plugins/commando.c @@ -13,6 +13,7 @@ #include #include #include +#include #include /* We (as your local commando command) detected an error. */ diff --git a/plugins/establish_onion_path.c b/plugins/establish_onion_path.c index bfef89cea..c74bc4430 100644 --- a/plugins/establish_onion_path.c +++ b/plugins/establish_onion_path.c @@ -1,6 +1,7 @@ #include "config.h" #include #include +#include #include #include #include diff --git a/plugins/establish_onion_path.h b/plugins/establish_onion_path.h index bb9a055c4..19411fef6 100644 --- a/plugins/establish_onion_path.h +++ b/plugins/establish_onion_path.h @@ -1,7 +1,6 @@ #ifndef LIGHTNING_PLUGINS_ESTABLISH_ONION_PATH_H #define LIGHTNING_PLUGINS_ESTABLISH_ONION_PATH_H #include "config.h" -#include #include struct gossmap; diff --git a/plugins/fetchinvoice.c b/plugins/fetchinvoice.c index c7013e694..10362e8aa 100644 --- a/plugins/fetchinvoice.c +++ b/plugins/fetchinvoice.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -20,6 +21,7 @@ #include #include #include +#include #include #include #include diff --git a/plugins/funder.c b/plugins/funder.c index cae9534db..af2997b3e 100644 --- a/plugins/funder.c +++ b/plugins/funder.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include diff --git a/plugins/keysend.c b/plugins/keysend.c index 6104bf607..79a6600da 100644 --- a/plugins/keysend.c +++ b/plugins/keysend.c @@ -4,11 +4,14 @@ #include #include #include +#include #include #include #include #include #include +#include +#include #include #include diff --git a/plugins/libplugin-pay.c b/plugins/libplugin-pay.c index 5409e00eb..9b3bd5fd9 100644 --- a/plugins/libplugin-pay.c +++ b/plugins/libplugin-pay.c @@ -3,17 +3,22 @@ #include #include #include +#include #include #include +#include #include #include #include #include #include #include +#include #include #include +#include #include +#include #include #include #include diff --git a/plugins/libplugin-pay.h b/plugins/libplugin-pay.h index bc1ec51b5..4df7d3fca 100644 --- a/plugins/libplugin-pay.h +++ b/plugins/libplugin-pay.h @@ -3,11 +3,8 @@ #include "config.h" #include -#include -#include -#include #include -#include +#include struct legacy_payload { struct short_channel_id scid; diff --git a/plugins/libplugin.c b/plugins/libplugin.c index 167d13621..6e7402604 100644 --- a/plugins/libplugin.c +++ b/plugins/libplugin.c @@ -3,11 +3,13 @@ #include #include #include +#include #include #include #include #include #include +#include #include #include #include @@ -17,6 +19,7 @@ #include #include #include +#include #include #include #include diff --git a/plugins/libplugin.h b/plugins/libplugin.h index 550429950..cec028b2f 100644 --- a/plugins/libplugin.h +++ b/plugins/libplugin.h @@ -3,21 +3,11 @@ #define LIGHTNING_PLUGINS_LIBPLUGIN_H #include "config.h" -#include -#include -#include -#include -#include #include -#include -#include #include #include -#include #include -#include #include -#include struct json_out; struct htable; diff --git a/plugins/offers.c b/plugins/offers.c index 575d7a8b0..5daf8b63a 100644 --- a/plugins/offers.c +++ b/plugins/offers.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -19,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/plugins/offers_inv_hook.c b/plugins/offers_inv_hook.c index 07bc1a7ed..4772899fb 100644 --- a/plugins/offers_inv_hook.c +++ b/plugins/offers_inv_hook.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include diff --git a/plugins/offers_invreq_hook.c b/plugins/offers_invreq_hook.c index 5c8cb142c..3a7574f24 100644 --- a/plugins/offers_invreq_hook.c +++ b/plugins/offers_invreq_hook.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -15,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/plugins/offers_offer.c b/plugins/offers_offer.c index e7c7ded18..77eae2c9b 100644 --- a/plugins/offers_offer.c +++ b/plugins/offers_offer.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include diff --git a/plugins/pay.c b/plugins/pay.c index 7deaf85bc..20de6e1b0 100644 --- a/plugins/pay.c +++ b/plugins/pay.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/plugins/renepay/disabledmap.c b/plugins/renepay/disabledmap.c index 68492eced..badeac868 100644 --- a/plugins/renepay/disabledmap.c +++ b/plugins/renepay/disabledmap.c @@ -1,4 +1,5 @@ #include "config.h" +#include #include struct disabledmap *disabledmap_new(const tal_t *ctx) diff --git a/plugins/renepay/main.c b/plugins/renepay/main.c index 01b4d13be..8d92ea78e 100644 --- a/plugins/renepay/main.c +++ b/plugins/renepay/main.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include diff --git a/plugins/spender/multifundchannel.c b/plugins/spender/multifundchannel.c index 5fef05204..af425736e 100644 --- a/plugins/spender/multifundchannel.c +++ b/plugins/spender/multifundchannel.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include diff --git a/plugins/spender/multiwithdraw.c b/plugins/spender/multiwithdraw.c index c6f448131..7950d1d1c 100644 --- a/plugins/spender/multiwithdraw.c +++ b/plugins/spender/multiwithdraw.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include diff --git a/plugins/spender/openchannel.c b/plugins/spender/openchannel.c index 90c5cdb28..85d15b06f 100644 --- a/plugins/spender/openchannel.c +++ b/plugins/spender/openchannel.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include diff --git a/plugins/spender/splice.c b/plugins/spender/splice.c index 1c8ce72fa..35098c0c7 100644 --- a/plugins/spender/splice.c +++ b/plugins/spender/splice.c @@ -11,6 +11,7 @@ #include #include #include +#include #include struct abort_pkg { diff --git a/plugins/topology.c b/plugins/topology.c index 4c84d02b9..4a440846b 100644 --- a/plugins/topology.c +++ b/plugins/topology.c @@ -14,6 +14,7 @@ #include #include #include +#include #include /* Access via get_gossmap() */ diff --git a/plugins/xpay/xpay.c b/plugins/xpay/xpay.c index bf5f9cb46..b4e2c4110 100644 --- a/plugins/xpay/xpay.c +++ b/plugins/xpay/xpay.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -20,6 +21,7 @@ #include #include #include +#include #include #include diff --git a/tests/fuzz/fuzz-bolt12-invrequest-decode.c b/tests/fuzz/fuzz-bolt12-invrequest-decode.c index 5a3ba5d23..159fb26b7 100644 --- a/tests/fuzz/fuzz-bolt12-invrequest-decode.c +++ b/tests/fuzz/fuzz-bolt12-invrequest-decode.c @@ -1,4 +1,5 @@ #include "config.h" +#include #include #include #include diff --git a/tests/fuzz/libfuzz.h b/tests/fuzz/libfuzz.h index cd095035a..332caa3e8 100644 --- a/tests/fuzz/libfuzz.h +++ b/tests/fuzz/libfuzz.h @@ -4,6 +4,7 @@ #include "config.h" #include #include +#include #include #include diff --git a/tests/plugins/channeld_fakenet.c b/tests/plugins/channeld_fakenet.c index fc08d2bf1..d56c5824f 100644 --- a/tests/plugins/channeld_fakenet.c +++ b/tests/plugins/channeld_fakenet.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/tools/hsmtool.c b/tools/hsmtool.c index 7f2d30fb9..484ef2b4c 100644 --- a/tools/hsmtool.c +++ b/tools/hsmtool.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/wallet/reservation.c b/wallet/reservation.c index 9c100a0cc..23cdaad5b 100644 --- a/wallet/reservation.c +++ b/wallet/reservation.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/wallet/test/run-wallet.c b/wallet/test/run-wallet.c index 0c29382b6..6371dfb26 100644 --- a/wallet/test/run-wallet.c +++ b/wallet/test/run-wallet.c @@ -40,6 +40,7 @@ static void test_error(struct lightningd *ld, bool fatal, const char *fmt, va_li #include #include #include +#include /* AUTOGENERATED MOCKS START */ /* Generated stub for add_node_announcement_sig */ diff --git a/wallet/txfilter.c b/wallet/txfilter.c index 10ef774e4..b96228611 100644 --- a/wallet/txfilter.c +++ b/wallet/txfilter.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include diff --git a/wallet/wallet.h b/wallet/wallet.h index f956196b3..7eb1a51c0 100644 --- a/wallet/wallet.h +++ b/wallet/wallet.h @@ -18,6 +18,7 @@ #include struct amount_msat; +struct bitcoin_signature; struct invoices; struct channel; struct channel_inflight; diff --git a/wire/Makefile b/wire/Makefile index d695f1a49..6d10c3e6b 100644 --- a/wire/Makefile +++ b/wire/Makefile @@ -74,6 +74,8 @@ wire/peer_wiregen.h_args := --include='common/channel_id.h' --include='bitcoin/t wire/peer_wiregen.c_args := -s --expose-tlv-type=tlv_n1 --expose-tlv-type=tlv_n2 +wire/peer_printgen.c_args := --include='wire/peer_wiregen.h' + # The payload isn't parsed in a fromwire, so we need to expose it. wire/onion_wiregen.h_args := --include='bitcoin/short_channel_id.h' --include='bitcoin/privkey.h' --include='common/bigsize.h' --include='common/amount.h' --include='common/node_id.h' --include='bitcoin/block.h' --include='common/sciddir_or_pubkey.h' -s --expose-tlv-type=tlv_payload @@ -86,8 +88,8 @@ wire/peer_exp_printgen.h_args := --include='wire/channel_type_printgen.h' wire/onion_exp_wiregen.h_args := $(wire/onion_wiregen.h_args) wire/onion_exp_wiregen.c_args := $(wire/onion_wiregen.c_args) -wire/bolt12_wiregen.c_args := -s --expose-tlv-type=tlv_blinded_path --expose-tlv-type=tlv_invoice_request --expose-tlv-type=tlv_invoice -wire/bolt12_wiregen.h_args := --include='bitcoin/short_channel_id.h' --include='bitcoin/signature.h' --include='bitcoin/privkey.h' --include='common/bigsize.h' --include='common/amount.h' --include='common/node_id.h' --include='bitcoin/block.h' --include='wire/onion_wire.h' $(wire/bolt12_wiregen.c_args) +wire/bolt12_wiregen.c_args := -s --expose-tlv-type=tlv_blinded_path --expose-tlv-type=tlv_invoice_request --expose-tlv-type=tlv_invoice --include='wire/onion_wiregen.h' +wire/bolt12_wiregen.h_args := --include='bitcoin/short_channel_id.h' --include='bitcoin/signature.h' --include='bitcoin/privkey.h' --include='common/bigsize.h' --include='common/amount.h' --include='common/node_id.h' --include='bitcoin/block.h' $(wire/bolt12_wiregen.c_args) wire/bolt12_printgen.c_args := --expose-tlv-type=tlv_blinded_path --expose-tlv-type=tlv_invoice_request --include='wire/onion_wiregen.h' --include='wire/onion_printgen.h' wire/bolt12_printgen.h_args := --include='wire/bolt12_wiregen.h' --expose-tlv-type=tlv_blinded_path --expose-tlv-type=tlv_invoice_request diff --git a/wire/onion_defs.h b/wire/onion_defs.h index cdfc0b3b8..312636f79 100644 --- a/wire/onion_defs.h +++ b/wire/onion_defs.h @@ -2,7 +2,6 @@ #ifndef LIGHTNING_WIRE_ONION_DEFS_H #define LIGHTNING_WIRE_ONION_DEFS_H #include "config.h" -#include /* BOLT #4: * diff --git a/wire/onion_wire.h b/wire/onion_wire.h deleted file mode 100644 index 54947d4db..000000000 --- a/wire/onion_wire.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef LIGHTNING_WIRE_ONION_WIRE_H -#define LIGHTNING_WIRE_ONION_WIRE_H -#include "config.h" -#include - -#include - -#endif /* LIGHTNING_WIRE_ONION_WIRE_H */ diff --git a/wire/peer_wire.h b/wire/peer_wire.h index 2097a3c9d..760e06230 100644 --- a/wire/peer_wire.h +++ b/wire/peer_wire.h @@ -1,7 +1,6 @@ #ifndef LIGHTNING_WIRE_PEER_WIRE_H #define LIGHTNING_WIRE_PEER_WIRE_H #include "config.h" -#include #include diff --git a/wire/tlvstream.c b/wire/tlvstream.c index 9e1c77426..8afb7f2b4 100644 --- a/wire/tlvstream.c +++ b/wire/tlvstream.c @@ -1,6 +1,7 @@ #include "config.h" #include #include +#include #include #include diff --git a/wire/tlvstream.h b/wire/tlvstream.h index 090ba4e21..a8a76e340 100644 --- a/wire/tlvstream.h +++ b/wire/tlvstream.h @@ -2,8 +2,6 @@ #define LIGHTNING_WIRE_TLVSTREAM_H #include "config.h" #include -#include -#include struct tlv_record_type { u64 type; diff --git a/wire/wire.h b/wire/wire.h index 548f5b074..8e8f12ac6 100644 --- a/wire/wire.h +++ b/wire/wire.h @@ -1,12 +1,9 @@ #ifndef LIGHTNING_WIRE_WIRE_H #define LIGHTNING_WIRE_WIRE_H #include "config.h" -#include -#include #include #include #include -#include struct ripemd160; struct sha256;