Skip to content

Commit

Permalink
source cleanup: sort include lines into alpha order
Browse files Browse the repository at this point in the history
This makes merging easier in future.

Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell committed Jan 21, 2016
1 parent d733e82 commit 9ebbe16
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion bitcoin/address.c
Original file line number Diff line number Diff line change
@@ -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)
{
Expand Down
12 changes: 6 additions & 6 deletions bitcoin/base58.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
// 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 <ccan/build_assert/build_assert.h>
#include <ccan/tal/str/str.h>
#include <openssl/bn.h>
#include <assert.h>
#include <secp256k1.h>
#include <string.h>
#include "address.h"
#include "base58.h"
#include "privkey.h"
#include "pubkey.h"
#include "shadouble.h"
#include <assert.h>
#include <ccan/build_assert/build_assert.h>
#include <ccan/tal/str/str.h>
#include <openssl/bn.h>
#include <secp256k1.h>
#include <string.h>

static const char enc_16[] = "0123456789abcdef";
static const char enc_58[] =
Expand Down
6 changes: 3 additions & 3 deletions bitcoin/pubkey.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <ccan/str/hex/hex.h>
#include <assert.h>
#include "pubkey.h"
#include "privkey.h"
#include "pubkey.h"
#include <assert.h>
#include <ccan/str/hex/hex.h>

/* Must agree on key validity with bitcoin! Stolen from bitcoin/src/pubkey.h's
* GetLen:
Expand Down
8 changes: 4 additions & 4 deletions bitcoin/script.c
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#include <ccan/crypto/ripemd160/ripemd160.h>
#include <ccan/crypto/sha256/sha256.h>
#include <ccan/endian/endian.h>
#include <assert.h>
#include "address.h"
#include "locktime.h"
#include "pubkey.h"
#include "script.h"
#include "signature.h"
#include <assert.h>
#include <ccan/crypto/ripemd160/ripemd160.h>
#include <ccan/crypto/sha256/sha256.h>
#include <ccan/endian/endian.h>

/* Some standard ops */
#define OP_PUSHBYTES(val) (val)
Expand Down
12 changes: 6 additions & 6 deletions bitcoin/signature.c
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
#include <ccan/cast/cast.h>
#include "privkey.h"
#include "pubkey.h"
#include "script.h"
#include "secp256k1.h"
#ifdef USE_SCHNORR
#include "secp256k1_schnorr.h"
#endif
#include "shadouble.h"
#include "signature.h"
#include "tx.h"
#include <assert.h>
#ifdef USE_SCHNORR
#include "secp256k1_schnorr.h"
#endif
#include <ccan/cast/cast.h>

#undef DEBUG
#ifdef DEBUG
#include <ccan/err/err.h>
#include <stdio.h>
# include <ccan/err/err.h>
# include <stdio.h>
#define SHA_FMT \
"%02x%02x%02x%02x%02x%02x%02x%02x" \
"%02x%02x%02x%02x%02x%02x%02x%02x" \
Expand Down
4 changes: 2 additions & 2 deletions bitcoin/tx.c
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#include "tx.h"
#include <assert.h>
#include <ccan/crypto/sha256/sha256.h>
#include <ccan/endian/endian.h>
#include <ccan/err/err.h>
#include <ccan/mem/mem.h>
#include <ccan/read_write_all/read_write_all.h>
#include <ccan/str/hex/hex.h>
#include <ccan/tal/grab_file/grab_file.h>
#include <assert.h>
#include "tx.h"

enum styles {
/* Add the CT padding stuff to amount. */
Expand Down
6 changes: 3 additions & 3 deletions find_p2sh_out.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#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"
#include <ccan/err/err.h>
#include <ccan/tal/tal.h>
#include <string.h>

u32 find_p2sh_out(const struct bitcoin_tx *tx, u8 *redeemscript)
{
Expand Down
2 changes: 1 addition & 1 deletion permute_tx.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "permute_tx.h"
#include <stdbool.h>
#include <string.h>
#include "permute_tx.h"

static void init_map(size_t *map, size_t len)
{
Expand Down
6 changes: 3 additions & 3 deletions pkt.c
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#include <ccan/crypto/sha256/sha256.h>
#include <ccan/err/err.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"
#include <ccan/crypto/sha256/sha256.h>
#include <ccan/err/err.h>
#include <ccan/tal/grab_file/grab_file.h>

size_t pkt_totlen(const struct pkt *pkt)
{
Expand Down
2 changes: 1 addition & 1 deletion protobuf_convert.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include <ccan/crypto/sha256/sha256.h>
#include "bitcoin/locktime.h"
#include "bitcoin/pubkey.h"
#include "bitcoin/signature.h"
#include "protobuf_convert.h"
#include <ccan/crypto/sha256/sha256.h>

Signature *signature_to_proto(const tal_t *ctx, const struct signature *sig)
{
Expand Down
2 changes: 1 addition & 1 deletion version.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "version.h"
#include "gen_version.h"
#include "version.h"
#include <stdio.h>

char *version_and_exit(const void *unused)
Expand Down

0 comments on commit 9ebbe16

Please sign in to comment.