Browse Source

Sort include lines (ignoring hacky cli test utils).

Put ccan first, openssl next, then standard headers, then locals.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 10 years ago
parent
commit
ef9463f6b1
  1. 8
      anchor.c
  2. 2
      bitcoin/address.c
  3. 2
      bitcoin/address.h
  4. 10
      bitcoin/base58.c
  5. 2
      bitcoin/base58.h
  6. 4
      bitcoin/pubkey.c
  7. 12
      bitcoin/script.c
  8. 1
      bitcoin/shadouble.h
  9. 8
      bitcoin/signature.c
  10. 2
      bitcoin/signature.h
  11. 6
      bitcoin/tx.c
  12. 6
      close_tx.c
  13. 6
      commit_tx.c
  14. 8
      find_p2sh_out.c
  15. 2
      permute_tx.c
  16. 6
      pkt.c
  17. 2
      pkt.h
  18. 6
      protobuf_convert.c
  19. 2
      protobuf_convert.h

8
anchor.c

@ -1,11 +1,11 @@
#include <ccan/err/err.h>
#include "anchor.h"
#include "bitcoin/pubkey.h"
#include "bitcoin/script.h"
#include "bitcoin/tx.h"
#include "overflows.h"
#include "pkt.h"
#include "permute_tx.h"
#include "bitcoin/script.h"
#include "bitcoin/pubkey.h"
#include <ccan/err/err.h>
#include "pkt.h"
#include "protobuf_convert.h"
struct bitcoin_tx *anchor_tx_create(const tal_t *ctx,

2
bitcoin/address.c

@ -1,6 +1,6 @@
#include <ccan/crypto/sha256/sha256.h>
#include "address.h"
#include "pubkey.h"
#include <ccan/crypto/sha256/sha256.h>
void bitcoin_address(const struct pubkey *key, struct bitcoin_address *addr)
{

2
bitcoin/address.h

@ -1,7 +1,7 @@
#ifndef LIGHTNING_BITCOIN_ADDRESS_H
#define LIGHTNING_BITCOIN_ADDRESS_H
#include <openssl/ripemd.h>
#include <ccan/short_types/short_types.h>
#include <openssl/ripemd.h>
struct pubkey;

10
bitcoin/base58.c

@ -3,16 +3,16 @@
// Copyright (c) 2009-2012 The Bitcoin Developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "base58.h"
#include "shadouble.h"
#include "address.h"
#include "pubkey.h"
#include <assert.h>
#include <ccan/build_assert/build_assert.h>
#include <ccan/tal/str/str.h>
#include <openssl/obj_mac.h>
#include <openssl/sha.h>
#include <assert.h>
#include <string.h>
#include "address.h"
#include "base58.h"
#include "pubkey.h"
#include "shadouble.h"
static const char enc_16[] = "0123456789abcdef";
static const char enc_58[] =

2
bitcoin/base58.h

@ -1,8 +1,8 @@
#ifndef LIGHTNING_BITCOIN_BASE58_H
#define LIGHTNING_BITCOIN_BASE58_H
/* FIXME: Use libsecpk1 */
#include <ccan/tal/tal.h>
#include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h>
#include <openssl/bn.h>
#include <openssl/ec.h>
#include <openssl/ripemd.h>

4
bitcoin/pubkey.c

@ -1,7 +1,7 @@
#include "pubkey.h"
#include <openssl/ecdsa.h>
#include <ccan/str/hex/hex.h>
#include <openssl/ecdsa.h>
#include <assert.h>
#include "pubkey.h"
/* Must agree on key validity with bitcoin! Stolen from bitcoin/src/pubkey.h's
* GetLen:

12
bitcoin/script.c

@ -1,11 +1,11 @@
#include "script.h"
#include "address.h"
#include "signature.h"
#include "pubkey.h"
#include <openssl/ripemd.h>
#include <ccan/endian/endian.h>
#include <ccan/crypto/sha256/sha256.h>
#include <ccan/endian/endian.h>
#include <openssl/ripemd.h>
#include <assert.h>
#include "address.h"
#include "pubkey.h"
#include "script.h"
#include "signature.h"
/* Some standard ops */
#define OP_PUSHBYTES(val) (val)

1
bitcoin/shadouble.h

@ -1,6 +1,5 @@
#ifndef LIGHTNING_BITCOIN_SHADOUBLE_H
#define LIGHTNING_BITCOIN_SHADOUBLE_H
#include "config.h"
#include <ccan/crypto/sha256/sha256.h>
/* To explicitly distinguish between single sha and bitcoin's standard double */

8
bitcoin/signature.c

@ -1,12 +1,12 @@
#include "signature.h"
#include "shadouble.h"
#include "tx.h"
#include <ccan/cast/cast.h>
#include "pubkey.h"
#include "script.h"
#include "shadouble.h"
#include "signature.h"
#include "tx.h"
#include <openssl/bn.h>
#include <openssl/obj_mac.h>
#include <assert.h>
#include <ccan/cast/cast.h>
#undef DEBUG
#ifdef DEBUG

2
bitcoin/signature.h

@ -1,8 +1,8 @@
#ifndef LIGHTNING_BITCOIN_SIGNATURE_H
#define LIGHTNING_BITCOIN_SIGNATURE_H
#include <ccan/short_types/short_types.h>
#include <openssl/ecdsa.h>
#include <ccan/tal/tal.h>
#include <openssl/ecdsa.h>
enum sighash_type {
SIGHASH_ALL = 1,

6
bitcoin/tx.c

@ -1,10 +1,10 @@
#include "tx.h"
#include <ccan/crypto/sha256/sha256.h>
#include <ccan/endian/endian.h>
#include <ccan/err/err.h>
#include <ccan/tal/grab_file/grab_file.h>
#include <ccan/str/hex/hex.h>
#include <ccan/endian/endian.h>
#include <ccan/tal/grab_file/grab_file.h>
#include <assert.h>
#include "tx.h"
static void add_varint(varint_t v,
void (*add)(const void *, size_t, void *), void *addp)

6
close_tx.c

@ -1,9 +1,9 @@
#include "close_tx.h"
#include "bitcoin/pubkey.h"
#include "bitcoin/script.h"
#include "bitcoin/shadouble.h"
#include "bitcoin/tx.h"
#include "bitcoin/script.h"
#include "close_tx.h"
#include "permute_tx.h"
#include "bitcoin/pubkey.h"
#include "pkt.h"
#include "protobuf_convert.h"

6
commit_tx.c

@ -1,9 +1,9 @@
#include "commit_tx.h"
#include "bitcoin/pubkey.h"
#include "bitcoin/script.h"
#include "bitcoin/shadouble.h"
#include "bitcoin/tx.h"
#include "bitcoin/script.h"
#include "commit_tx.h"
#include "permute_tx.h"
#include "bitcoin/pubkey.h"
#include "pkt.h"
#include "protobuf_convert.h"

8
find_p2sh_out.c

@ -1,9 +1,9 @@
#include "find_p2sh_out.h"
#include "bitcoin/tx.h"
#include "bitcoin/script.h"
#include <string.h>
#include <ccan/err/err.h>
#include <ccan/tal/tal.h>
#include <string.h>
#include "bitcoin/script.h"
#include "bitcoin/tx.h"
#include "find_p2sh_out.h"
u32 find_p2sh_out(const struct bitcoin_tx *tx, u8 *redeemscript)
{

2
permute_tx.c

@ -1,7 +1,7 @@
#include "permute_tx.h"
#include <ccan/crypto/sha256/sha256.h>
#include <stdbool.h>
#include <string.h>
#include "permute_tx.h"
static u32 get_next_rand(struct sha256 *h, size_t *randidx)
{

6
pkt.c

@ -1,11 +1,11 @@
#include <ccan/crypto/sha256/sha256.h>
#include <ccan/tal/grab_file/grab_file.h>
#include <ccan/err/err.h>
#include "pkt.h"
#include "bitcoin/tx.h"
#include <ccan/tal/grab_file/grab_file.h>
#include "bitcoin/address.h"
#include "bitcoin/pubkey.h"
#include "bitcoin/signature.h"
#include "bitcoin/tx.h"
#include "pkt.h"
#include "protobuf_convert.h"
static struct pkt *to_pkt(const tal_t *ctx, Pkt__PktCase type, void *msg)

2
pkt.h

@ -5,10 +5,10 @@
* This could be a simple set of macros, if the protobuf-c people hadn't
* insisted on "prettifing" the names they generate into CamelCase.
*/
#include "lightning.pb-c.h"
#include <ccan/endian/endian.h>
#include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h>
#include "lightning.pb-c.h"
/* A packet, ready to be de-protobuf'ed. */
struct pkt {

6
protobuf_convert.c

@ -1,7 +1,7 @@
#include "protobuf_convert.h"
#include "bitcoin/signature.h"
#include "bitcoin/pubkey.h"
#include <ccan/crypto/sha256/sha256.h>
#include "bitcoin/pubkey.h"
#include "bitcoin/signature.h"
#include "protobuf_convert.h"
Signature *signature_to_proto(const tal_t *ctx, const struct signature *sig)
{

2
protobuf_convert.h

@ -1,8 +1,8 @@
#ifndef LIGHTNING_PROTOBUF_CONVERT_H
#define LIGHTNING_PROTOBUF_CONVERT_H
#include "lightning.pb-c.h"
#include <ccan/tal/tal.h>
#include <stdbool.h>
#include "lightning.pb-c.h"
/* Convert to-from protobuf to internal representation. */
struct signature;

Loading…
Cancel
Save