cleanup: remove unneeded includes in header files.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2021-09-16 14:30:42 +09:30
parent 1ab2b4a3fb
commit ea30c34d82
183 changed files with 548 additions and 608 deletions

View file

@ -2,7 +2,6 @@
#define LIGHTNING_BITCOIN_ADDRESS_H
#include "config.h"
#include <ccan/crypto/ripemd160/ripemd160.h>
#include <ccan/short_types/short_types.h>
/* An address is the RIPEMD160 of the SHA of the public key. */
struct bitcoin_address {

View file

@ -4,10 +4,6 @@
#include <bitcoin/chainparams.h>
#include <ccan/crypto/ripemd160/ripemd160.h>
#include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h>
#include <stdbool.h>
#include <stdlib.h>
struct pubkey;
struct privkey;

View file

@ -3,10 +3,8 @@
#include "config.h"
#include "bitcoin/shadouble.h"
#include <ccan/endian/endian.h>
#include <ccan/short_types/short_types.h>
#include <ccan/structeq/structeq.h>
#include <ccan/tal/tal.h>
#include <stdbool.h>
struct chainparams;

View file

@ -1,6 +1,7 @@
#include "chainparams.h"
#include <ccan/array_size/array_size.h>
#include <ccan/str/str.h>
#include <ccan/tal/str/str.h>
#include <common/utils.h>
#include <string.h>

View file

@ -3,11 +3,8 @@
#include "config.h"
#include <bitcoin/block.h>
#include <ccan/short_types/short_types.h>
#include <ccan/tal/str/str.h>
#include <common/amount.h>
#include <common/bip32.h>
#include <stdbool.h>
#define ELEMENTS_ASSET_LEN 33

View file

@ -3,7 +3,6 @@
#include "config.h"
#include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h>
#include <stddef.h>
struct wally_psbt;
struct wally_psbt_input;

View file

@ -2,11 +2,9 @@
#define LIGHTNING_BITCOIN_PUBKEY_H
#include "config.h"
#include <ccan/crypto/ripemd160/ripemd160.h>
#include <ccan/crypto/sha256/sha256.h>
#include <ccan/short_types/short_types.h>
#include <ccan/structeq/structeq.h>
#include <ccan/tal/tal.h>
#include <secp256k1.h>
#include <secp256k1_extrakeys.h>
struct privkey;

View file

@ -3,8 +3,6 @@
#include "config.h"
#include "signature.h"
#include "tx.h"
#include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h>
#include <wally_script.h>
struct bitcoin_address;

View file

@ -1,12 +1,11 @@
#ifndef LIGHTNING_BITCOIN_SHORT_CHANNEL_ID_H
#define LIGHTNING_BITCOIN_SHORT_CHANNEL_ID_H
#include "config.h"
#include <ccan/compiler/compiler.h>
#include <ccan/short_types/short_types.h>
#include <ccan/structeq/structeq.h>
#include <ccan/tal/tal.h>
#include <common/gossip_constants.h>
#include <stdbool.h>
#include <stddef.h>
/* Short Channel ID is composed of 3 bytes for the block height, 3
* bytes of tx index in block and 2 bytes of output index. */

View file

@ -4,7 +4,6 @@
#include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h>
#include <secp256k1.h>
#include <stdbool.h>
struct sha256_double;
struct sha256_ctx;

View file

@ -12,6 +12,7 @@
#include <ccan/str/hex/hex.h>
#include <common/type_to_string.h>
#include <stdio.h>
#include <wally_psbt.h>
#include <wire/wire.h>
#define SEGREGATED_WITNESS_FLAG 0x1

View file

@ -4,11 +4,8 @@
#include "shadouble.h"
#include "signature.h"
#include "varint.h"
#include <ccan/short_types/short_types.h>
#include <ccan/structeq/structeq.h>
#include <ccan/tal/tal.h>
#include <common/amount.h>
#include <wally_psbt.h>
#include <wally_transaction.h>
#define BITCOIN_TX_DEFAULT_SEQUENCE 0xFFFFFFFF

View file

@ -5,7 +5,6 @@
#define LIGHTNING_BITCOIN_TX_PARTS_H
#include "config.h"
#include <bitcoin/tx.h>
#include <wally_transaction.h>
struct tx_parts {
/* The txid of this transacation */

View file

@ -1,9 +1,7 @@
#ifndef LIGHTNING_CHANNELD_CHANNELD_HTLC_H
#define LIGHTNING_CHANNELD_CHANNELD_HTLC_H
#include "config.h"
#include <bitcoin/locktime.h>
#include <ccan/short_types/short_types.h>
#include <common/amount.h>
#include <ccan/crypto/siphash24/siphash24.h>
#include <common/htlc.h>
#include <common/pseudorand.h>
#include <wire/onion_wire.h>

View file

@ -1,10 +1,7 @@
#ifndef LIGHTNING_CHANNELD_COMMIT_TX_H
#define LIGHTNING_CHANNELD_COMMIT_TX_H
#include "config.h"
#include <bitcoin/chainparams.h>
#include <bitcoin/pubkey.h>
#include <channeld/channeld_htlc.h>
#include <common/htlc.h>
#include <common/initial_commit_tx.h>
struct keyset;

View file

@ -11,6 +11,7 @@
#include <ccan/tal/str/str.h>
#include <channeld/commit_tx.h>
#include <channeld/full_channel.h>
#include <channeld/full_channel_error.h>
#include <common/blockheight_states.h>
#include <common/channel_config.h>
#include <common/features.h>

View file

@ -1,9 +1,6 @@
#ifndef LIGHTNING_CHANNELD_WATCHTOWER_H
#define LIGHTNING_CHANNELD_WATCHTOWER_H
#include "config.h"
#include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h>
#include <common/derive_basepoints.h>
#include <common/initial_channel.h>
const struct bitcoin_tx *

View file

@ -1,5 +1,7 @@
#include <bitcoin/script.h>
#include <ccan/cast/cast.h>
#include <ccan/fdpass/fdpass.h>
#include <ccan/tal/str/str.h>
#include <closingd/closingd_wiregen.h>
#include <common/close_tx.h>
#include <common/closing_fee.h>

View file

@ -2,8 +2,6 @@
#define LIGHTNING_COMMON_ADDR_H
#include "config.h"
#include <bitcoin/chainparams.h>
#include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h>
/* Given a scriptPubkey, return an encoded address */
char *encode_scriptpubkey_to_addr(const tal_t *ctx,

View file

@ -1,10 +1,8 @@
#ifndef LIGHTNING_COMMON_AMOUNT_H
#define LIGHTNING_COMMON_AMOUNT_H
#include "config.h"
#include <ccan/build_assert/build_assert.h>
#include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h>
#include <stdbool.h>
#define MSAT_PER_SAT ((u64)1000)
#define SAT_PER_BTC ((u64)100000000)

View file

@ -2,10 +2,8 @@
#define LIGHTNING_COMMON_BECH32_UTIL_H
#include "config.h"
#include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h>
#include <common/hash_u5.h>
#include <stdbool.h>
/**
* Push the bytes in src in 5 bit format onto the end of data.

View file

@ -2,11 +2,8 @@
#define LIGHTNING_COMMON_BOLT11_H
#include "config.h"
#include <bitcoin/pubkey.h>
#include <bitcoin/short_channel_id.h>
#include <ccan/list/list.h>
#include <ccan/short_types/short_types.h>
#include <ccan/take/take.h>
#include <common/hash_u5.h>
#include <common/node_id.h>
#include <secp256k1_recovery.h>

View file

@ -2,12 +2,14 @@
#include <bitcoin/base58.h>
#include <bitcoin/chainparams.h>
#include <bitcoin/script.h>
#include <ccan/tal/str/str.h>
#include <common/bech32.h>
#include <common/bolt11.h>
#include <common/bolt11_json.h>
#include <common/json.h>
#include <common/json_helpers.h>
#include <common/json_stream.h>
#include <common/utils.h>
static void json_add_fallback(struct json_stream *response,
const char *fieldname,

View file

@ -3,11 +3,13 @@
#include <ccan/cast/cast.h>
#include <ccan/crypto/sha256/sha256.h>
#include <ccan/mem/mem.h>
#include <ccan/tal/str/str.h>
#include <common/bech32.h>
#include <common/bech32_util.h>
#include <common/bolt12.h>
#include <common/bolt12_merkle.h>
#include <common/features.h>
#include <common/utils.h>
#include <secp256k1_schnorrsig.h>
#include <time.h>

View file

@ -4,6 +4,7 @@
#include <ccan/ilog/ilog.h>
#include <ccan/mem/mem.h>
#include <common/bolt12_merkle.h>
#include <common/utils.h>
#ifndef SUPERVERBOSE
#define SUPERVERBOSE(...)

View file

@ -1,8 +1,6 @@
#ifndef LIGHTNING_COMMON_CHANNEL_CONFIG_H
#define LIGHTNING_COMMON_CHANNEL_CONFIG_H
#include "config.h"
#include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h>
#include <common/amount.h>
/* BOLT #2:

View file

@ -1,11 +1,7 @@
#ifndef LIGHTNING_COMMON_CLOSE_TX_H
#define LIGHTNING_COMMON_CLOSE_TX_H
#include "config.h"
#include <bitcoin/chainparams.h>
#include <bitcoin/tx.h>
#include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h>
#include <common/amount.h>
struct pubkey;

View file

@ -1,9 +1,11 @@
#include "config.h"
#include <assert.h>
#include <bitcoin/tx.h>
#include <ccan/ccan/cast/cast.h>
#include <ccan/tal/str/str.h>
#include <common/coin_mvt.h>
#include <common/type_to_string.h>
#include <wire/wire.h>
static const char *mvt_types[] = { "chain_mvt", "channel_mvt" };
const char *mvt_type_str(enum mvt_type type)

View file

@ -2,14 +2,8 @@
#define LIGHTNING_COMMON_COIN_MVT_H
#include "config.h"
#include <bitcoin/tx.h>
#include <ccan/ccan/crypto/sha256/sha256.h>
#include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h>
#include <common/amount.h>
#include <common/channel_id.h>
#include <stdbool.h>
#include <wire/wire.h>
#define COIN_MVT_VERSION 1

View file

@ -1,7 +1,6 @@
#ifndef LIGHTNING_COMMON_CONFIGDIR_H
#define LIGHTNING_COMMON_CONFIGDIR_H
#include "config.h"
#include <ccan/ptrint/ptrint.h>
#include <ccan/tal/tal.h>
/* Put things we're going to get rid of behind this, so testers can catch

View file

@ -2,8 +2,6 @@
#define LIGHTNING_COMMON_CRYPTO_STATE_H
#include "config.h"
#include <bitcoin/privkey.h>
#include <ccan/short_types/short_types.h>
#include <stddef.h>
struct crypto_state {
/* Received and sent nonces. */

View file

@ -1,7 +1,6 @@
#ifndef LIGHTNING_COMMON_CRYPTOMSG_H
#define LIGHTNING_COMMON_CRYPTOMSG_H
#include "config.h"
#include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h>
#include <common/crypto_state.h>

View file

@ -2,8 +2,6 @@
#define LIGHTNING_COMMON_DAEMON_CONN_H
#include "config.h"
#include <ccan/io/io.h>
#include <ccan/short_types/short_types.h>
#include <common/msg_queue.h>
/**

View file

@ -1,7 +1,6 @@
#ifndef LIGHTNING_COMMON_DECODE_ARRAY_H
#define LIGHTNING_COMMON_DECODE_ARRAY_H
#include "config.h"
#include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h>
#include <common/bigsize.h>

View file

@ -4,7 +4,6 @@
#include <assert.h>
#include <bitcoin/privkey.h>
#include <bitcoin/pubkey.h>
#include <ccan/build_assert/build_assert.h>
#include <ccan/crypto/shachain/shachain.h>
struct sha256;

View file

@ -6,6 +6,7 @@
#include <ccan/time/time.h>
#include <common/dijkstra.h>
#include <common/gossmap.h>
#include <common/utils.h>
#include <gheap.h>
#include <inttypes.h>
#include <stdio.h>

View file

@ -1,8 +1,6 @@
#ifndef LIGHTNING_COMMON_DIJKSTRA_H
#define LIGHTNING_COMMON_DIJKSTRA_H
#include "config.h"
#include <ccan/tal/tal.h>
#include <ccan/typesafe_cb/typesafe_cb.h>
#include <common/amount.h>
struct gossmap;

View file

@ -4,7 +4,6 @@
#include "config.h"
#include <ccan/short_types/short_types.h>
#include <inttypes.h>
typedef s32 errcode_t;

View file

@ -2,7 +2,6 @@
#define LIGHTNING_COMMON_HSM_ENCRYPTION_H
#include "config.h"
#include <bitcoin/privkey.h>
#include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h>
#include <sodium.h>

View file

@ -4,11 +4,7 @@
#include "bitcoin/locktime.h"
#include "htlc_state.h"
#include <assert.h>
#include <ccan/crypto/sha256/sha256.h>
#include <ccan/crypto/siphash24/siphash24.h>
#include <ccan/htable/htable_type.h>
#include <ccan/short_types/short_types.h>
#include <ccan/str/str.h>
#define NUM_SIDES (REMOTE + 1)
enum side {

View file

@ -2,7 +2,6 @@
#define LIGHTNING_COMMON_HTLC_TX_H
#include "config.h"
#include <bitcoin/chainparams.h>
#include <common/amount.h>
#include <common/htlc.h>
#include <common/utils.h>

View file

@ -2,11 +2,8 @@
#define LIGHTNING_COMMON_HTLC_WIRE_H
#include "config.h"
#include <bitcoin/preimage.h>
#include <ccan/short_types/short_types.h>
#include <common/amount.h>
#include <common/htlc.h>
#include <common/sphinx.h>
#include <wire/onion_wire.h>
struct bitcoin_tx;
struct shachain;

View file

@ -3,17 +3,11 @@
#define LIGHTNING_COMMON_INITIAL_CHANNEL_H
#include "config.h"
#include <bitcoin/pubkey.h>
#include <bitcoin/shadouble.h>
#include <bitcoin/tx.h>
#include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h>
#include <common/amount.h>
#include <common/channel_config.h>
#include <common/channel_id.h>
#include <common/derive_basepoints.h>
#include <common/htlc.h>
#include <stdbool.h>
struct signature;
struct added_htlc;

View file

@ -4,7 +4,6 @@
#include "config.h"
#include <bitcoin/chainparams.h>
#include <bitcoin/pubkey.h>
#include <common/amount.h>
#include <common/htlc.h>
#include <common/utils.h>

View file

@ -3,7 +3,6 @@
#include "config.h"
#include <ccan/io/io.h>
#include <ccan/tal/tal.h>
struct io_lock;
/**

View file

@ -2,13 +2,8 @@
#define LIGHTNING_COMMON_JSON_H
#include "config.h"
#include <ccan/crypto/sha256/sha256.h>
#include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h>
#include <common/errcode.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#define JSMN_STRICT 1
# include <external/jsmn/jsmn.h>

View file

@ -4,10 +4,8 @@
#define LIGHTNING_COMMON_JSON_COMMAND_H
#include "config.h"
#include <ccan/compiler/compiler.h>
#include <common/errcode.h>
#include <common/json.h>
#include <common/jsonrpc_errors.h>
#include <stdbool.h>
struct command;
struct command_result;

View file

@ -2,7 +2,6 @@
#ifndef LIGHTNING_COMMON_JSON_HELPERS_H
#define LIGHTNING_COMMON_JSON_HELPERS_H
#include "config.h"
#include <bitcoin/short_channel_id.h>
#include <bitcoin/tx.h>
#include <common/json.h>
#include <wire/wire.h>
@ -18,6 +17,7 @@ struct pubkey;
struct pubkey32;
struct secret;
struct short_channel_id;
struct short_channel_id_dir;
struct wireaddr;
struct wireaddr_internal;
struct wally_psbt;

View file

@ -4,13 +4,7 @@
#ifndef LIGHTNING_COMMON_JSON_STREAM_H
#define LIGHTNING_COMMON_JSON_STREAM_H
#include "config.h"
#include <ccan/membuf/membuf.h>
#include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h>
#include <ccan/typesafe_cb/typesafe_cb.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
struct command;
struct io_conn;

View file

@ -16,6 +16,7 @@
#include <common/json_tok.h>
#include <common/jsonrpc_errors.h>
#include <common/param.h>
#include <common/utils.h>
struct command_result *param_array(struct command *cmd, const char *name,
const char *buffer, const jsmntok_t *tok,

View file

@ -2,7 +2,6 @@
#define LIGHTNING_COMMON_KEYSET_H
#include "config.h"
#include <bitcoin/pubkey.h>
#include <stdbool.h>
struct basepoints;

View file

@ -22,6 +22,7 @@
#include "config.h"
#include <assert.h>
#include <backtrace.h>
#include <ccan/cast/cast.h>
#include <ccan/crypto/siphash24/siphash24.h>
#include <ccan/htable/htable.h>
#include <ccan/intmap/intmap.h>

View file

@ -1,10 +1,8 @@
#ifndef LIGHTNING_COMMON_MEMLEAK_H
#define LIGHTNING_COMMON_MEMLEAK_H
#include "config.h"
#include <ccan/cast/cast.h>
#include <ccan/strmap/strmap.h>
#include <ccan/tal/tal.h>
#include <ccan/typesafe_cb/typesafe_cb.h>
#include <inttypes.h>
struct htable;

View file

@ -4,7 +4,6 @@
#include "config.h"
#include <ccan/io/io.h>
#include <ccan/short_types/short_types.h>
#include <ccan/take/take.h>
/* Reserved type used to indicate we're actually passing an fd. */
#define MSG_PASS_FD 0xFFFF

View file

@ -5,6 +5,7 @@
#include <common/ecdh.h>
#include <common/onion.h>
#include <common/sphinx.h>
#include <common/utils.h>
#include <sodium/crypto_aead_chacha20poly1305.h>
#include <wire/onion_wire.h>

View file

@ -2,7 +2,6 @@
#define LIGHTNING_COMMON_ONION_H
#include "config.h"
#include <bitcoin/privkey.h>
#include <ccan/short_types/short_types.h>
#include <common/amount.h>
struct route_step;

View file

@ -1,6 +1,7 @@
#include <ccan/asort/asort.h>
#include <ccan/tal/str/str.h>
#include <common/json_command.h>
#include <common/json_tok.h>
#include <common/jsonrpc_errors.h>
#include <common/param.h>
#include <common/utils.h>

View file

@ -2,8 +2,6 @@
#define LIGHTNING_COMMON_PARAM_H
#include "config.h"
#include <common/json.h>
#include <common/json_tok.h>
#include <stdbool.h>
/*~ Greetings adventurer!
*

View file

@ -2,8 +2,6 @@
#define LIGHTNING_COMMON_PENALTY_BASE_H
#include "config.h"
#include <bitcoin/tx.h>
#include <ccan/short_types/short_types.h>
#include <common/amount.h>
/* To create a penalty, all we need are these. */
struct penalty_base {

View file

@ -4,9 +4,7 @@
#include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h>
#include <common/tx_roles.h>
#include <stdbool.h>
#include <wally_psbt.h>
#include <wally_transaction.h>
struct channel_id;
struct wally_tx_input;

View file

@ -16,6 +16,7 @@
#include <secp256k1_ecdh.h>
#include <sodium/crypto_stream_chacha20.h>
#include <sodium/randombytes.h>
#include <wire/wire.h>

View file

@ -5,11 +5,7 @@
#include "bitcoin/privkey.h"
#include "bitcoin/pubkey.h"
#include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h>
#include <common/hmac.h>
#include <secp256k1.h>
#include <sodium/randombytes.h>
#include <wire/onion_wire.h>
struct node_id;

View file

@ -1,13 +1,8 @@
#ifndef LIGHTNING_COMMON_STATUS_H
#define LIGHTNING_COMMON_STATUS_H
#include "config.h"
#include <ccan/compiler/compiler.h>
#include <ccan/short_types/short_types.h>
#include <ccan/take/take.h>
#include <common/status_levels.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdlib.h>
struct channel_id;
struct daemon_conn;

View file

@ -1,3 +1,4 @@
#include <common/status_levels.h>
#include <common/status_wire.h>
#include <wire/wire.h>

View file

@ -1,6 +1,7 @@
#include <common/per_peer_state.h>
#include <common/node_id.h>
#include <common/status_wire.h>
#include <common/status_levels.h>
msgtype,status_log,0xFFF0
msgdata,status_log,level,enum log_level,

1 #include <common/per_peer_state.h>
2 #include <common/node_id.h>
3 #include <common/status_wire.h>
4 #include <common/status_levels.h>
5 msgtype,status_log,0xFFF0
6 msgdata,status_log,level,enum log_level,
7 msgdata,status_log,peer,?node_id,

View file

@ -214,4 +214,4 @@ bool fromwire_status_version(const tal_t *ctx, const void *p, wirestring **versi
*version = fromwire_wirestring(ctx, &cursor, &plen);
return cursor != NULL;
}
// SHA256STAMP:83a462b28754c5b0c5a496b7e719f15ef6f6c1560f0eea12f76fa4b114189caa
// SHA256STAMP:6910f83360952ba00ee6a56e96a7402d9b973eb125a6c98bec4d52fa97740457

View file

@ -10,6 +10,7 @@
#include <common/per_peer_state.h>
#include <common/node_id.h>
#include <common/status_wire.h>
#include <common/status_levels.h>
enum status_wire {
WIRE_STATUS_LOG = 0xFFF0,
@ -58,4 +59,4 @@ bool fromwire_status_version(const tal_t *ctx, const void *p, wirestring **versi
#endif /* LIGHTNING_COMMON_STATUS_WIREGEN_H */
// SHA256STAMP:83a462b28754c5b0c5a496b7e719f15ef6f6c1560f0eea12f76fa4b114189caa
// SHA256STAMP:6910f83360952ba00ee6a56e96a7402d9b973eb125a6c98bec4d52fa97740457

View file

@ -1,4 +1,5 @@
#include <ccan/tal/str/str.h>
#include <common/daemon.h>
#include <common/dev_disconnect.h>
#include <common/status.h>
#include <common/subdaemon.h>

View file

@ -2,6 +2,7 @@
#define LIGHTNING_COMMON_SUBDAEMON_H
#include "config.h"
#include <common/daemon.h>
struct htable;
/* daemon_setup, but for subdaemons */

View file

@ -3,9 +3,7 @@
#include "config.h"
#include <ccan/tal/tal.h>
#include <ccan/time/time.h>
#include <ccan/timer/timer.h>
#include <ccan/typesafe_cb/typesafe_cb.h>
/* tal_free this to disable timer. */
struct oneshot *new_reltimer_(struct timers *timers,

View file

@ -3,8 +3,6 @@
#include "config.h"
#include "utils.h"
#include <ccan/autodata/autodata.h>
#include <secp256k1.h>
#include <wally_psbt.h>
/* This must match the type_to_string_ cases. */
union printable_types {

View file

@ -2,15 +2,8 @@
#define LIGHTNING_COMMON_UTXO_H
#include "config.h"
#include <assert.h>
#include <bitcoin/chainparams.h>
#include <bitcoin/pubkey.h>
#include <bitcoin/shadouble.h>
#include <bitcoin/tx.h>
#include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h>
#include <common/amount.h>
#include <common/node_id.h>
#include <stdbool.h>
struct ext_key;

View file

@ -1,5 +1,7 @@
#include "version.h"
#include <ccan/compiler/compiler.h>
#include <stdio.h>
#include <stdlib.h>
/* Only common/version.c can safely include this. */
# include "version_gen.h"

View file

@ -1,7 +1,6 @@
#ifndef LIGHTNING_COMMON_VERSION_H
#define LIGHTNING_COMMON_VERSION_H
#include "config.h"
#include <ccan/opt/opt.h>
char *version_and_exit(const void *unused);
const char *version(void);

View file

@ -1,10 +1,8 @@
#ifndef LIGHTNING_COMMON_WIRE_ERROR_H
#define LIGHTNING_COMMON_WIRE_ERROR_H
#include "config.h"
#include <ccan/compiler/compiler.h>
#include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h>
#include <stdarg.h>
struct channel_id;

View file

@ -3,8 +3,6 @@
#include "config.h"
#include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h>
#include <stdbool.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <sys/un.h>

View file

@ -1,8 +1,6 @@
#ifndef LIGHTNING_CONNECTD_HANDSHAKE_H
#define LIGHTNING_CONNECTD_HANDSHAKE_H
#include "config.h"
#include <ccan/tal/tal.h>
#include <ccan/typesafe_cb/typesafe_cb.h>
struct crypto_state;
struct io_conn;

View file

@ -1,7 +1,6 @@
#ifndef LIGHTNING_CONNECTD_NETADDRESS_H
#define LIGHTNING_CONNECTD_NETADDRESS_H
#include "config.h"
#include <ccan/short_types/short_types.h>
#include <common/wireaddr.h>
/* Address is a wildcard: try to guess what it looks like to outside world */

View file

@ -1,6 +1,7 @@
#include <bitcoin/chainparams.h>
#include <ccan/cast/cast.h>
#include <ccan/err/err.h>
#include <ccan/opt/opt.h>
#include <ccan/tal/str/str.h>
#include <common/bech32_util.h>
#include <common/bolt12.h>

View file

@ -7,6 +7,7 @@
#include <ccan/opt/opt.h>
#include <ccan/read_write_all/read_write_all.h>
#include <ccan/str/hex/hex.h>
#include <ccan/tal/str/str.h>
#include <common/crypto_sync.h>
#include <common/dev_disconnect.h>
#include <common/features.h>

View file

@ -2,9 +2,7 @@
#define LIGHTNING_GOSSIPD_BROADCAST_H
#include "config.h"
#include <ccan/list/list.h>
#include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h>
/* This is nested inside a node, chan or half_chan; rewriting the store can
* cause it to change! */

View file

@ -1,5 +1,6 @@
/* Routines to make our own gossip messages. Not as in "we're the gossip
* generation, man!" */
#include <ccan/cast/cast.h>
#include <ccan/mem/mem.h>
#include <common/features.h>
#include <common/memleak.h>

View file

@ -4,6 +4,7 @@
#include "config.h"
#include <bitcoin/short_channel_id.h>
#include <ccan/list/list.h>
#include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h>
#include <gossipd/routing.h>

View file

@ -29,6 +29,7 @@
#include <common/bech32_util.h>
#include <common/blinding.h>
#include <common/cryptomsg.h>
#include <common/daemon.h>
#include <common/daemon_conn.h>
#include <common/ecdh_hsmd.h>
#include <common/features.h>

View file

@ -1,11 +1,7 @@
#ifndef LIGHTNING_GOSSIPD_GOSSIPD_H
#define LIGHTNING_GOSSIPD_GOSSIPD_H
#include "config.h"
#include <bitcoin/block.h>
#include <ccan/list/list.h>
#include <ccan/short_types/short_types.h>
#include <ccan/timer/timer.h>
#include <common/bigsize.h>
#include <common/node_id.h>
#include <wire/peer_wire.h>

View file

@ -17,6 +17,7 @@
#include <ccan/read_write_all/read_write_all.h>
#include <ccan/take/take.h>
#include <ccan/tal/str/str.h>
#include <common/daemon.h>
#include <common/daemon_conn.h>
#include <common/derive_basepoints.h>
#include <common/hsm_encryption.h>

View file

@ -1,5 +1,6 @@
#include <bitcoin/script.h>
#include <ccan/crypto/hkdf_sha256/hkdf_sha256.h>
#include <ccan/tal/str/str.h>
#include <common/bolt12_merkle.h>
#include <common/hash_u5.h>
#include <common/key_derive.h>
@ -7,6 +8,12 @@
#include <common/type_to_string.h>
#include <hsmd/capabilities.h>
#include <hsmd/libhsmd.h>
#include <inttypes.h>
#include <secp256k1_ecdh.h>
#include <secp256k1_schnorrsig.h>
#include <sodium/utils.h>
#include <wally_bip32.h>
#include <wally_psbt.h>
#include <wire/peer_wire.h>
#if DEVELOPER

View file

@ -1,16 +1,9 @@
#ifndef LIGHTNING_HSMD_LIBHSMD_H
#define LIGHTNING_HSMD_LIBHSMD_H
#include <bitcoin/privkey.h>
#include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h>
#include <common/node_id.h>
#include <common/status_levels.h>
#include <hsmd/hsmd_wiregen.h>
#include <secp256k1_ecdh.h>
#include <secp256k1_schnorrsig.h>
#include <sodium.h>
#include <wally_bip32.h>
/*~ A struct that holds some context about the origin of an
* incoming request. It can either be a main daemon client, which is

View file

@ -29,6 +29,7 @@
#include <errno.h>
#include <inttypes.h>
#include <lightningd/chaintopology.h>
#include <lightningd/io_loop_with_timers.h>
#include <lightningd/plugin.h>
/* The names of the requests we can make to our Bitcoin backend. */

View file

@ -4,12 +4,7 @@
#include <bitcoin/chainparams.h>
#include <bitcoin/tx.h>
#include <ccan/list/list.h>
#include <ccan/short_types/short_types.h>
#include <ccan/strmap/strmap.h>
#include <ccan/tal/tal.h>
#include <ccan/time/time.h>
#include <ccan/typesafe_cb/typesafe_cb.h>
#include <stdbool.h>
struct bitcoin_blkid;
struct bitcoin_tx_output;

View file

@ -23,12 +23,16 @@
#include <common/memleak.h>
#include <common/param.h>
#include <common/timeout.h>
#include <common/type_to_string.h>
#include <common/utils.h>
#include <inttypes.h>
#include <lightningd/channel_control.h>
#include <lightningd/coin_mvts.h>
#include <lightningd/gossip_control.h>
#include <lightningd/io_loop_with_timers.h>
#include <lightningd/json.h>
#include <math.h>
#include <wallet/txfilter.h>
/* Mutual recursion via timer. */
static void try_extend_tip(struct chain_topology *topo);

View file

@ -2,16 +2,8 @@
#define LIGHTNING_LIGHTNINGD_CHAINTOPOLOGY_H
#include "config.h"
#include <bitcoin/block.h>
#include <bitcoin/tx.h>
#include <ccan/list/list.h>
#include <ccan/short_types/short_types.h>
#include <ccan/structeq/structeq.h>
#include <ccan/time/time.h>
#include <jsmn.h>
#include <lightningd/json.h>
#include <lightningd/watch.h>
#include <math.h>
#include <stddef.h>
struct bitcoin_tx;
struct bitcoind;

View file

@ -26,6 +26,7 @@
#include <lightningd/opening_control.h>
#include <lightningd/peer_control.h>
#include <lightningd/subd.h>
#include <wallet/txfilter.h>
#include <wire/wire_sync.h>
static bool connects_to_peer(struct subd *owner)

View file

@ -1,13 +1,11 @@
#ifndef LIGHTNING_LIGHTNINGD_CHANNEL_H
#define LIGHTNING_LIGHTNINGD_CHANNEL_H
#include "config.h"
#include <ccan/list/list.h>
#include <common/channel_id.h>
#include <common/channel_type.h>
#include <common/per_peer_state.h>
#include <common/tx_roles.h>
#include <common/utils.h>
#include <lightningd/channel_state.h>
#include <lightningd/peer_htlcs.h>
#include <wallet/wallet.h>
struct channel_id;

View file

@ -8,18 +8,24 @@
#include <common/gossip_constants.h>
#include <common/json_command.h>
#include <common/json_helpers.h>
#include <common/json_tok.h>
#include <common/jsonrpc_errors.h>
#include <common/memleak.h>
#include <common/param.h>
#include <common/per_peer_state.h>
#include <common/psbt_open.h>
#include <common/shutdown_scriptpubkey.h>
#include <common/timeout.h>
#include <common/type_to_string.h>
#include <common/tx_roles.h>
#include <common/utils.h>
#include <common/wire_error.h>
#include <errno.h>
#include <hsmd/capabilities.h>
#include <inttypes.h>
#include <lightningd/channel.h>
#include <lightningd/channel_control.h>
#include <lightningd/chaintopology.h>
#include <lightningd/closing_control.h>
#include <lightningd/coin_mvts.h>
#include <lightningd/dual_open_control.h>

View file

@ -1,18 +1,26 @@
#include <bitcoin/feerate.h>
#include <bitcoin/script.h>
#include <ccan/cast/cast.h>
#include <ccan/mem/mem.h>
#include <ccan/tal/str/str.h>
#include <channeld/channeld_wiregen.h>
#include <closingd/closingd_wiregen.h>
#include <common/close_tx.h>
#include <common/closing_fee.h>
#include <common/fee_states.h>
#include <common/initial_commit_tx.h>
#include <common/json_command.h>
#include <common/json_helpers.h>
#include <common/json_tok.h>
#include <common/param.h>
#include <common/per_peer_state.h>
#include <common/shutdown_scriptpubkey.h>
#include <common/timeout.h>
#include <common/type_to_string.h>
#include <common/utils.h>
#include <errno.h>
#include <gossipd/gossipd_wiregen.h>
#include <hsmd/capabilities.h>
#include <inttypes.h>
#include <lightningd/bitcoind.h>
#include <lightningd/chaintopology.h>
@ -20,6 +28,8 @@
#include <lightningd/closing_control.h>
#include <lightningd/dual_open_control.h>
#include <lightningd/hsm_control.h>
#include <lightningd/json.h>
#include <lightningd/jsonrpc.h>
#include <lightningd/lightningd.h>
#include <lightningd/log.h>
#include <lightningd/opening_common.h>

View file

@ -1,3 +1,4 @@
#include <lightningd/channel.h>
#include <lightningd/coin_mvts.h>
#include <lightningd/notification.h>

View file

@ -3,8 +3,6 @@
#include "config.h"
#include <common/coin_mvt.h>
#include <lightningd/channel.h>
#include <lightningd/htlc_end.h>
#include <lightningd/lightningd.h>
void notify_channel_mvt(struct lightningd *ld, const struct channel_coin_mvt *mvt);

View file

@ -8,12 +8,14 @@
#include <common/json_command.h>
#include <common/json_helpers.h>
#include <common/json_stream.h>
#include <common/json_tok.h>
#include <common/jsonrpc_errors.h>
#include <common/memleak.h>
#include <common/node_id.h>
#include <common/param.h>
#include <common/pseudorand.h>
#include <common/timeout.h>
#include <common/type_to_string.h>
#include <common/wireaddr.h>
#include <connectd/connectd_wiregen.h>
#include <errno.h>

View file

@ -1,3 +1,6 @@
#include <ccan/tal/str/str.h>
#include <common/json_command.h>
#include <common/json_tok.h>
#include <common/param.h>
#include <lightningd/json.h>
#include <lightningd/jsonrpc.h>

Some files were not shown because too many files have changed in this diff Show more