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 */