mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-03 10:46:58 +01:00
headers: fix up header idempotent lines.
For future reference, done via: for f in `find wire/ bitcoin/ common/ lightningd -name '*.h' ! -name 'gen*'`; do ID=`echo -n LIGHTNING/$f | tr 'a-z' 'A-Z' | tr -cs 'A-Z0-9' _`; sed 's/^#\(ifndef\|define\) .*_H$/#\1 '$ID/ < $f | sed 's,#endif /..*_H ./$,#endif /* '$ID' */,' | bagto $f; done Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
a37c165cb9
commit
8c22bd9ee1
54 changed files with 153 additions and 153 deletions
|
@ -50,4 +50,4 @@ bool key_from_base58(const char *base58, size_t base58_len,
|
|||
|
||||
void base58_get_checksum(u8 csum[4], const u8 buf[], size_t buflen);
|
||||
|
||||
#endif /* PETTYCOIN_BITCOIN_BASE58_H */
|
||||
#endif /* LIGHTNING_BITCOIN_BASE58_H */
|
||||
|
|
|
@ -45,4 +45,4 @@ int pubkey_cmp(const struct pubkey *a, const struct pubkey *b);
|
|||
* pubkey_to_hash160 - Get the hash for p2pkh payments for a given pubkey
|
||||
*/
|
||||
void pubkey_to_hash160(const struct pubkey *pk, struct ripemd160 *hash);
|
||||
#endif /* LIGHTNING_PUBKEY_H */
|
||||
#endif /* LIGHTNING_BITCOIN_PUBKEY_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_LIGHTNINGD_BIP32_H
|
||||
#define LIGHTNING_LIGHTNINGD_BIP32_H
|
||||
#ifndef LIGHTNING_COMMON_BIP32_H
|
||||
#define LIGHTNING_COMMON_BIP32_H
|
||||
#include "config.h"
|
||||
#include <ccan/short_types/short_types.h>
|
||||
#include <stddef.h>
|
||||
|
@ -9,4 +9,4 @@ struct ext_key;
|
|||
void towire_ext_key(u8 **pptr, const struct ext_key *bip32);
|
||||
void fromwire_ext_key(const u8 **cursor, size_t *max, struct ext_key *bip32);
|
||||
|
||||
#endif /* LIGHTNING_LIGHTNINGD_BIP32_H */
|
||||
#endif /* LIGHTNING_COMMON_BIP32_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_LIGHTNINGD_CHANNEL_CONFIG_H
|
||||
#define LIGHTNING_LIGHTNINGD_CHANNEL_CONFIG_H
|
||||
#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>
|
||||
|
@ -45,4 +45,4 @@ struct channel_config {
|
|||
void towire_channel_config(u8 **pptr, const struct channel_config *config);
|
||||
void fromwire_channel_config(const u8 **ptr, size_t *max,
|
||||
struct channel_config *config);
|
||||
#endif /* LIGHTNING_LIGHTNINGD_CHANNEL_CONFIG_H */
|
||||
#endif /* LIGHTNING_COMMON_CHANNEL_CONFIG_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_CLOSE_TX_H
|
||||
#define LIGHTNING_CLOSE_TX_H
|
||||
#ifndef LIGHTNING_COMMON_CLOSE_TX_H
|
||||
#define LIGHTNING_COMMON_CLOSE_TX_H
|
||||
#include "config.h"
|
||||
#include <ccan/short_types/short_types.h>
|
||||
#include <ccan/tal/tal.h>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#ifndef LIGHTNING_DAEMON_CONFIGDIR_H
|
||||
#define LIGHTNING_DAEMON_CONFIGDIR_H
|
||||
#ifndef LIGHTNING_COMMON_CONFIGDIR_H
|
||||
#define LIGHTNING_COMMON_CONFIGDIR_H
|
||||
#include "config.h"
|
||||
#include <ccan/tal/tal.h>
|
||||
|
||||
void configdir_register_opts(const tal_t *ctx,
|
||||
char **config_dir, char **rpc_filename);
|
||||
|
||||
#endif /* LIGHTNING_DAEMON_CONFIGDIR_H */
|
||||
#endif /* LIGHTNING_COMMON_CONFIGDIR_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_LIGHTNINGD_CRYPTO_SYNC_H
|
||||
#define LIGHTNING_LIGHTNINGD_CRYPTO_SYNC_H
|
||||
#ifndef LIGHTNING_COMMON_CRYPTO_SYNC_H
|
||||
#define LIGHTNING_COMMON_CRYPTO_SYNC_H
|
||||
#include "config.h"
|
||||
#include <ccan/short_types/short_types.h>
|
||||
#include <ccan/tal/tal.h>
|
||||
|
@ -9,4 +9,4 @@ struct crypto_state;
|
|||
bool sync_crypto_write(struct crypto_state *cs, int fd, const void *msg TAKES);
|
||||
u8 *sync_crypto_read(const tal_t *ctx, struct crypto_state *cs, int fd);
|
||||
|
||||
#endif /* LIGHTNING_LIGHTNINGD_CRYPTO_SYNC_H */
|
||||
#endif /* LIGHTNING_COMMON_CRYPTO_SYNC_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_LIGHTNINGD_CRYPTOMSG_H
|
||||
#define LIGHTNING_LIGHTNINGD_CRYPTOMSG_H
|
||||
#ifndef LIGHTNING_COMMON_CRYPTOMSG_H
|
||||
#define LIGHTNING_COMMON_CRYPTOMSG_H
|
||||
#include "config.h"
|
||||
#include <bitcoin/privkey.h>
|
||||
#include <ccan/short_types/short_types.h>
|
||||
|
@ -56,4 +56,4 @@ u8 *cryptomsg_encrypt_msg(const tal_t *ctx,
|
|||
bool cryptomsg_decrypt_header(struct crypto_state *cs, u8 hdr[18], u16 *lenp);
|
||||
u8 *cryptomsg_decrypt_body(const tal_t *ctx,
|
||||
struct crypto_state *cs, const u8 *in);
|
||||
#endif /* LIGHTNING_LIGHTNINGD_CRYPTOMSG_H */
|
||||
#endif /* LIGHTNING_COMMON_CRYPTOMSG_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_LIGHTNINGD_DAEMON_CONN_H
|
||||
#define LIGHTNING_LIGHTNINGD_DAEMON_CONN_H
|
||||
#ifndef LIGHTNING_COMMON_DAEMON_CONN_H
|
||||
#define LIGHTNING_COMMON_DAEMON_CONN_H
|
||||
|
||||
#include "config.h"
|
||||
#include <ccan/io/io.h>
|
||||
|
@ -72,4 +72,4 @@ struct io_plan *daemon_conn_read_next(struct io_conn *conn,
|
|||
* daemon_conn_sync_flush - Flush connection by sending all messages now..
|
||||
*/
|
||||
bool daemon_conn_sync_flush(struct daemon_conn *dc);
|
||||
#endif /* LIGHTNING_LIGHTNINGD_DAEMON_CONN_H */
|
||||
#endif /* LIGHTNING_COMMON_DAEMON_CONN_H */
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef LIGHTNING_LIGHTNINGD_DEBUG_H
|
||||
#define LIGHTNING_LIGHTNINGD_DEBUG_H
|
||||
#ifndef LIGHTNING_COMMON_DEBUG_H
|
||||
#define LIGHTNING_COMMON_DEBUG_H
|
||||
#include "config.h"
|
||||
|
||||
void subdaemon_debug(int argc, char *argv[]);
|
||||
|
||||
#endif /* LIGHTNING_LIGHTNINGD_DEBUG_H */
|
||||
#endif /* LIGHTNING_COMMON_DEBUG_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_LIGHTNINGD_DERIVE_BASEPOINTS_H
|
||||
#define LIGHTNING_LIGHTNINGD_DERIVE_BASEPOINTS_H
|
||||
#ifndef LIGHTNING_COMMON_DERIVE_BASEPOINTS_H
|
||||
#define LIGHTNING_COMMON_DERIVE_BASEPOINTS_H
|
||||
#include "config.h"
|
||||
#include <assert.h>
|
||||
#include <bitcoin/privkey.h>
|
||||
|
@ -72,4 +72,4 @@ static inline u64 revocations_received(const struct shachain *shachain)
|
|||
{
|
||||
return (1ULL << SHACHAIN_BITS) - (shachain_next_index(shachain) + 1);
|
||||
}
|
||||
#endif /* LIGHTNING_LIGHTNINGD_DERIVE_BASEPOINTS_H */
|
||||
#endif /* LIGHTNING_COMMON_DERIVE_BASEPOINTS_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_LIGHTNINGD_DEV_DISCONNECT_H
|
||||
#define LIGHTNING_LIGHTNINGD_DEV_DISCONNECT_H
|
||||
#ifndef LIGHTNING_COMMON_DEV_DISCONNECT_H
|
||||
#define LIGHTNING_COMMON_DEV_DISCONNECT_H
|
||||
#include "config.h"
|
||||
#include <stdbool.h>
|
||||
|
||||
|
@ -17,4 +17,4 @@ void dev_sabotage_fd(int fd);
|
|||
/* For debug code to set in daemon. */
|
||||
void dev_disconnect_init(int fd);
|
||||
|
||||
#endif /* LIGHTNING_LIGHTNINGD_DEV_DISCONNECT_H */
|
||||
#endif /* LIGHTNING_COMMON_DEV_DISCONNECT_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_LIGHTNINGD_FUNDING_TX_H
|
||||
#define LIGHTNING_LIGHTNINGD_FUNDING_TX_H
|
||||
#ifndef LIGHTNING_COMMON_FUNDING_TX_H
|
||||
#define LIGHTNING_COMMON_FUNDING_TX_H
|
||||
#include "config.h"
|
||||
#include <ccan/short_types/short_types.h>
|
||||
#include <ccan/tal/tal.h>
|
||||
|
@ -41,4 +41,4 @@ struct bitcoin_tx *funding_tx(const tal_t *ctx,
|
|||
u64 change_satoshis,
|
||||
const struct pubkey *changekey,
|
||||
const struct ext_key *bip32_base);
|
||||
#endif /* LIGHTNING_LIGHTNINGD_FUNDING_TX_H */
|
||||
#endif /* LIGHTNING_COMMON_FUNDING_TX_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_DAEMON_HTLC_H
|
||||
#define LIGHTNING_DAEMON_HTLC_H
|
||||
#ifndef LIGHTNING_COMMON_HTLC_H
|
||||
#define LIGHTNING_COMMON_HTLC_H
|
||||
#include "config.h"
|
||||
#include "bitcoin/locktime.h"
|
||||
#include "htlc_state.h"
|
||||
|
@ -81,4 +81,4 @@ static inline enum side str_to_side(const char *str)
|
|||
assert(streq(str, "REMOTE"));
|
||||
return REMOTE;
|
||||
}
|
||||
#endif /* LIGHTNING_DAEMON_HTLC_H */
|
||||
#endif /* LIGHTNING_COMMON_HTLC_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_DAEMON_HTLC_STATE_H
|
||||
#define LIGHTNING_DAEMON_HTLC_STATE_H
|
||||
#ifndef LIGHTNING_COMMON_HTLC_STATE_H
|
||||
#define LIGHTNING_COMMON_HTLC_STATE_H
|
||||
#include "config.h"
|
||||
|
||||
enum htlc_state {
|
||||
|
@ -33,4 +33,4 @@ enum htlc_state {
|
|||
|
||||
HTLC_STATE_INVALID
|
||||
};
|
||||
#endif /* LIGHTNING_DAEMON_HTLC_STATE_H */
|
||||
#endif /* LIGHTNING_COMMON_HTLC_STATE_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_LIGHTNINGD_HTLC_TX_H
|
||||
#define LIGHTNING_LIGHTNINGD_HTLC_TX_H
|
||||
#ifndef LIGHTNING_COMMON_HTLC_TX_H
|
||||
#define LIGHTNING_COMMON_HTLC_TX_H
|
||||
#include "config.h"
|
||||
#include <common/htlc.h>
|
||||
|
||||
|
@ -86,4 +86,4 @@ u8 *htlc_offered_wscript(const tal_t *ctx,
|
|||
const struct ripemd160 *ripemd,
|
||||
const struct keyset *keyset);
|
||||
|
||||
#endif /* LIGHTNING_LIGHTNINGD_HTLC_TX_H */
|
||||
#endif /* LIGHTNING_COMMON_HTLC_TX_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_LIGHTNINGD_HTLC_WIRE_H
|
||||
#define LIGHTNING_LIGHTNINGD_HTLC_WIRE_H
|
||||
#ifndef LIGHTNING_COMMON_HTLC_WIRE_H
|
||||
#define LIGHTNING_COMMON_HTLC_WIRE_H
|
||||
#include "config.h"
|
||||
#include <bitcoin/preimage.h>
|
||||
#include <ccan/short_types/short_types.h>
|
||||
|
@ -57,4 +57,4 @@ enum side fromwire_side(const u8 **cursor, size_t *max);
|
|||
void fromwire_shachain(const u8 **cursor, size_t *max,
|
||||
struct shachain *shachain);
|
||||
void fromwire_bitcoin_tx(const u8 **cursor, size_t *max, struct bitcoin_tx *tx);
|
||||
#endif /* LIGHTNING_LIGHTNINGD_HTLC_WIRE_H */
|
||||
#endif /* LIGHTNING_COMMON_HTLC_WIRE_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_DAEMON_JSON_H
|
||||
#define LIGHTNING_DAEMON_JSON_H
|
||||
#ifndef LIGHTNING_COMMON_JSON_H
|
||||
#define LIGHTNING_COMMON_JSON_H
|
||||
#include "config.h"
|
||||
#include <bitcoin/pubkey.h>
|
||||
#include <ccan/tal/tal.h>
|
||||
|
@ -106,4 +106,4 @@ void json_add_hex(struct json_result *result, const char *fieldname,
|
|||
void json_add_object(struct json_result *result, ...);
|
||||
|
||||
const char *json_result_string(const struct json_result *result);
|
||||
#endif /* LIGHTNING_DAEMON_JSON_H */
|
||||
#endif /* LIGHTNING_COMMON_JSON_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_LIGHTNINGD_KEY_DERIVE_H
|
||||
#define LIGHTNING_LIGHTNINGD_KEY_DERIVE_H
|
||||
#ifndef LIGHTNING_COMMON_KEY_DERIVE_H
|
||||
#define LIGHTNING_COMMON_KEY_DERIVE_H
|
||||
#include "config.h"
|
||||
#include <ccan/short_types/short_types.h>
|
||||
#include <stdbool.h>
|
||||
|
@ -33,4 +33,4 @@ bool derive_revocation_privkey(const struct secret *base_secret,
|
|||
struct ext_key;
|
||||
bool bip32_pubkey(const struct ext_key *bip32_base,
|
||||
struct pubkey *pubkey, u32 index);
|
||||
#endif /* LIGHTNING_LIGHTNINGD_KEY_DERIVE_H */
|
||||
#endif /* LIGHTNING_COMMON_KEY_DERIVE_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_LIGHTNINGD_KEYSET_H
|
||||
#define LIGHTNING_LIGHTNINGD_KEYSET_H
|
||||
#ifndef LIGHTNING_COMMON_KEYSET_H
|
||||
#define LIGHTNING_COMMON_KEYSET_H
|
||||
#include "config.h"
|
||||
#include <bitcoin/pubkey.h>
|
||||
#include <stdbool.h>
|
||||
|
@ -17,4 +17,4 @@ bool derive_keyset(const struct pubkey *per_commitment_point,
|
|||
const struct pubkey *self_delayed_basepoint,
|
||||
const struct pubkey *other_revocation_basepoint,
|
||||
struct keyset *keyset);
|
||||
#endif /* LIGHTNING_LIGHTNINGD_KEYSET_H */
|
||||
#endif /* LIGHTNING_COMMON_KEYSET_H */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* Helper for simple message queues. */
|
||||
#ifndef LIGHTNING_LIGHTNINGD_MSG_QUEUE_H
|
||||
#define LIGHTNING_LIGHTNINGD_MSG_QUEUE_H
|
||||
#ifndef LIGHTNING_COMMON_MSG_QUEUE_H
|
||||
#define LIGHTNING_COMMON_MSG_QUEUE_H
|
||||
#include "config.h"
|
||||
#include <ccan/io/io.h>
|
||||
#include <ccan/short_types/short_types.h>
|
||||
|
@ -33,4 +33,4 @@ int msg_extract_fd(const u8 *msg);
|
|||
#define msg_queue_wait(conn, q, next, arg) \
|
||||
io_out_wait((conn), (q), (next), (arg))
|
||||
|
||||
#endif /* LIGHTNING_LIGHTNINGD_MSG_QUEUE_H */
|
||||
#endif /* LIGHTNING_COMMON_MSG_QUEUE_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_OVERFLOWS_H
|
||||
#define LIGHTNING_OVERFLOWS_H
|
||||
#ifndef LIGHTNING_COMMON_OVERFLOWS_H
|
||||
#define LIGHTNING_COMMON_OVERFLOWS_H
|
||||
#include "config.h"
|
||||
|
||||
static inline bool add_overflows_size_t(uint64_t a, uint64_t b)
|
||||
|
@ -31,4 +31,4 @@ static inline bool mul_overflows_u64(uint64_t a, uint64_t b)
|
|||
ret = a * b;
|
||||
return (ret / a != b);
|
||||
}
|
||||
#endif /* LIGHTNING_OVERFLOWS_H */
|
||||
#endif /* LIGHTNING_COMMON_OVERFLOWS_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_LIGHTNINGD_PEER_FAILED_H
|
||||
#define LIGHTNING_LIGHTNINGD_PEER_FAILED_H
|
||||
#ifndef LIGHTNING_COMMON_PEER_FAILED_H
|
||||
#define LIGHTNING_COMMON_PEER_FAILED_H
|
||||
#include "config.h"
|
||||
#include <ccan/compiler/compiler.h>
|
||||
#include <ccan/short_types/short_types.h>
|
||||
|
@ -18,4 +18,4 @@ void peer_failed(int peer_fd, struct crypto_state *cs,
|
|||
const struct channel_id *channel_id,
|
||||
u16 error_code, const char *fmt, ...)
|
||||
PRINTF_FMT(5,6) NORETURN;
|
||||
#endif /* LIGHTNING_STATUS_H */
|
||||
#endif /* LIGHTNING_COMMON_PEER_FAILED_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_PERMUTE_TX_H
|
||||
#define LIGHTNING_PERMUTE_TX_H
|
||||
#ifndef LIGHTNING_COMMON_PERMUTE_TX_H
|
||||
#define LIGHTNING_COMMON_PERMUTE_TX_H
|
||||
#include "config.h"
|
||||
#include "bitcoin/tx.h"
|
||||
|
||||
|
@ -16,4 +16,4 @@ void permute_inputs(struct bitcoin_tx_input *inputs, size_t num_inputs,
|
|||
*/
|
||||
void permute_outputs(struct bitcoin_tx_output *outputs, size_t num_outputs,
|
||||
const void **map);
|
||||
#endif /* LIGHTNING_PERMUTE_TX_H */
|
||||
#endif /* LIGHTNING_COMMON_PERMUTE_TX_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_LIGHTNINGD_PING_H
|
||||
#define LIGHTNING_LIGHTNINGD_PING_H
|
||||
#ifndef LIGHTNING_COMMON_PING_H
|
||||
#define LIGHTNING_COMMON_PING_H
|
||||
#include "config.h"
|
||||
#include <ccan/short_types/short_types.h>
|
||||
#include <ccan/tal/tal.h>
|
||||
|
@ -10,4 +10,4 @@ bool check_ping_make_pong(const tal_t *ctx, const u8 *ping, u8 **pong);
|
|||
/* Make a ping packet requesting num_pong_bytes */
|
||||
u8 *make_ping(const tal_t *ctx, u16 num_pong_bytes, u16 padlen);
|
||||
|
||||
#endif /* LIGHTNING_LIGHTNINGD_PING_H */
|
||||
#endif /* LIGHTNING_COMMON_PING_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_DAEMON_PSEUDORAND_H
|
||||
#define LIGHTNING_DAEMON_PSEUDORAND_H
|
||||
#ifndef LIGHTNING_COMMON_PSEUDORAND_H
|
||||
#define LIGHTNING_COMMON_PSEUDORAND_H
|
||||
#include "config.h"
|
||||
#include <stdint.h>
|
||||
|
||||
|
@ -13,4 +13,4 @@ uint64_t pseudorand(uint64_t max);
|
|||
*/
|
||||
const struct siphash_seed *siphash_seed(void);
|
||||
|
||||
#endif /* LIGHTNING_DAEMON_PSEUDORAND_H */
|
||||
#endif /* LIGHTNING_COMMON_PSEUDORAND_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_DAEMON_SPHINX_H
|
||||
#define LIGHTNING_DAEMON_SPHINX_H
|
||||
#ifndef LIGHTNING_COMMON_SPHINX_H
|
||||
#define LIGHTNING_COMMON_SPHINX_H
|
||||
|
||||
#include "config.h"
|
||||
#include "bitcoin/privkey.h"
|
||||
|
@ -196,4 +196,4 @@ struct onionreply *unwrap_onionreply(const tal_t *ctx,
|
|||
const struct secret *shared_secrets,
|
||||
const int numhops, const u8 *reply);
|
||||
|
||||
#endif /* LIGHTNING_DAEMON_SPHINX_H */
|
||||
#endif /* LIGHTNING_COMMON_SPHINX_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_LIGHTNINGD_STATUS_H
|
||||
#define LIGHTNING_LIGHTNINGD_STATUS_H
|
||||
#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>
|
||||
|
@ -27,4 +27,4 @@ void status_trace(const char *fmt, ...) PRINTF_FMT(1,2);
|
|||
/* Send a failure status code with printf-style msg, and exit. */
|
||||
void status_failed(u16 code, const char *fmt, ...) PRINTF_FMT(2,3) NORETURN;
|
||||
|
||||
#endif /* LIGHTNING_LIGHTNINGD_STATUS_H */
|
||||
#endif /* LIGHTNING_COMMON_STATUS_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_DAEMON_TIMEOUT_H
|
||||
#define LIGHTNING_DAEMON_TIMEOUT_H
|
||||
#ifndef LIGHTNING_COMMON_TIMEOUT_H
|
||||
#define LIGHTNING_COMMON_TIMEOUT_H
|
||||
#include "config.h"
|
||||
|
||||
#include <ccan/tal/tal.h>
|
||||
|
@ -19,4 +19,4 @@ struct oneshot *new_reltimer_(struct timers *timers,
|
|||
|
||||
void timer_expired(tal_t *ctx, struct timer *timer);
|
||||
|
||||
#endif /* LIGHTNING_DAEMON_TIMEOUT_H */
|
||||
#endif /* LIGHTNING_COMMON_TIMEOUT_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_TYPE_TO_STRING_H
|
||||
#define LIGHTNING_TYPE_TO_STRING_H
|
||||
#ifndef LIGHTNING_COMMON_TYPE_TO_STRING_H
|
||||
#define LIGHTNING_COMMON_TYPE_TO_STRING_H
|
||||
#include "config.h"
|
||||
#include "utils.h"
|
||||
#include <ccan/autodata/autodata.h>
|
||||
|
@ -64,4 +64,4 @@ struct type_to_string {
|
|||
char *(*fmt)(const tal_t *ctx, union printable_types u);
|
||||
};
|
||||
AUTODATA_TYPE(type_to_string, struct type_to_string);
|
||||
#endif /* LIGHTNING_UTILS_H */
|
||||
#endif /* LIGHTNING_COMMON_TYPE_TO_STRING_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_UTILS_H
|
||||
#define LIGHTNING_UTILS_H
|
||||
#ifndef LIGHTNING_COMMON_UTILS_H
|
||||
#define LIGHTNING_COMMON_UTILS_H
|
||||
#include "config.h"
|
||||
#include <ccan/short_types/short_types.h>
|
||||
#include <ccan/tal/tal.h>
|
||||
|
@ -20,4 +20,4 @@ u8 *tal_hexdata(const tal_t *ctx, const void *str, size_t len);
|
|||
tal_alloc_((ctx), 0, false, false, \
|
||||
__FILE__ ":" stringify(__LINE__) ":tal_tmpctx")
|
||||
|
||||
#endif /* LIGHTNING_UTILS_H */
|
||||
#endif /* LIGHTNING_COMMON_UTILS_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_LIGHTNINGD_UTXO_H
|
||||
#define LIGHTNING_LIGHTNINGD_UTXO_H
|
||||
#ifndef LIGHTNING_COMMON_UTXO_H
|
||||
#define LIGHTNING_COMMON_UTXO_H
|
||||
#include "config.h"
|
||||
#include <bitcoin/shadouble.h>
|
||||
#include <ccan/short_types/short_types.h>
|
||||
|
@ -22,4 +22,4 @@ void fromwire_utxo(const u8 **ptr, size_t *max, struct utxo *utxo);
|
|||
* wants arr of structs */
|
||||
struct utxo *from_utxoptr_arr(const tal_t *ctx, const struct utxo **utxos);
|
||||
const struct utxo **to_utxoptr_arr(const tal_t *ctx, const struct utxo *utxos);
|
||||
#endif /* LIGHTNING_LIGHTNINGD_UTXO_H */
|
||||
#endif /* LIGHTNING_COMMON_UTXO_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_VERSION_H
|
||||
#define LIGHTNING_VERSION_H
|
||||
#ifndef LIGHTNING_COMMON_VERSION_H
|
||||
#define LIGHTNING_COMMON_VERSION_H
|
||||
#include "config.h"
|
||||
#include <ccan/opt/opt.h>
|
||||
|
||||
|
@ -10,4 +10,4 @@ const char *version(void);
|
|||
opt_register_early_noarg("--version|-V", version_and_exit, NULL, \
|
||||
"print version to standard output and exit")
|
||||
|
||||
#endif /* LIGHTNING_VERSION_H */
|
||||
#endif /* LIGHTNING_COMMON_VERSION_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_LIGHTNINGD_WITHDRAW_TX_H
|
||||
#define LIGHTNING_LIGHTNINGD_WITHDRAW_TX_H
|
||||
#ifndef LIGHTNING_COMMON_WITHDRAW_TX_H
|
||||
#define LIGHTNING_COMMON_WITHDRAW_TX_H
|
||||
#include "config.h"
|
||||
#include <ccan/short_types/short_types.h>
|
||||
#include <ccan/tal/tal.h>
|
||||
|
@ -30,4 +30,4 @@ struct bitcoin_tx *withdraw_tx(const tal_t *ctx,
|
|||
const u64 changesat,
|
||||
const struct ext_key *bip32_base);
|
||||
|
||||
#endif /* LIGHTNING_LIGHTNINGD_WITHDRAW_TX_H */
|
||||
#endif /* LIGHTNING_COMMON_WITHDRAW_TX_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_DAEMON_BITCOIND_H
|
||||
#define LIGHTNING_DAEMON_BITCOIND_H
|
||||
#ifndef LIGHTNING_LIGHTNINGD_BITCOIND_H
|
||||
#define LIGHTNING_LIGHTNINGD_BITCOIND_H
|
||||
#include "config.h"
|
||||
#include <bitcoin/chainparams.h>
|
||||
#include <ccan/list/list.h>
|
||||
|
@ -123,4 +123,4 @@ void bitcoind_getrawblock_(struct bitcoind *bitcoind,
|
|||
struct bitcoind *, \
|
||||
struct bitcoin_block *), \
|
||||
(arg))
|
||||
#endif /* LIGHTNING_DAEMON_BITCOIND_H */
|
||||
#endif /* LIGHTNING_LIGHTNINGD_BITCOIND_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_DAEMON_CHAINTOPOLOGY_H
|
||||
#define LIGHTNING_DAEMON_CHAINTOPOLOGY_H
|
||||
#ifndef LIGHTNING_LIGHTNINGD_CHAINTOPOLOGY_H
|
||||
#define LIGHTNING_LIGHTNINGD_CHAINTOPOLOGY_H
|
||||
#include "config.h"
|
||||
#include <bitcoin/block.h>
|
||||
#include <bitcoin/shadouble.h>
|
||||
|
@ -160,4 +160,4 @@ void json_dev_broadcast(struct command *cmd,
|
|||
struct chain_topology *topo,
|
||||
const char *buffer, const jsmntok_t *params);
|
||||
|
||||
#endif /* LIGHTNING_DAEMON_CRYPTOPKT_H */
|
||||
#endif /* LIGHTNING_LIGHTNINGD_CHAINTOPOLOGY_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNINGD_CHANNELD_HTLC_H
|
||||
#define LIGHTNINGD_CHANNELD_HTLC_H
|
||||
#ifndef LIGHTNING_LIGHTNINGD_CHANNEL_CHANNELD_HTLC_H
|
||||
#define LIGHTNING_LIGHTNINGD_CHANNEL_CHANNELD_HTLC_H
|
||||
#include "config.h"
|
||||
#include <ccan/short_types/short_types.h>
|
||||
#include <common/pseudorand.h>
|
||||
|
@ -76,4 +76,4 @@ static inline bool htlc_is_dead(const struct htlc *htlc)
|
|||
return htlc->state == RCVD_REMOVE_ACK_REVOCATION
|
||||
|| htlc->state == SENT_REMOVE_ACK_REVOCATION;
|
||||
}
|
||||
#endif /* LIGHTNINGD_CHANNELD_HTLC_H */
|
||||
#endif /* LIGHTNING_LIGHTNINGD_CHANNEL_CHANNELD_HTLC_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_LIGHTNINGD_COMMIT_TX_H
|
||||
#define LIGHTNING_LIGHTNINGD_COMMIT_TX_H
|
||||
#ifndef LIGHTNING_LIGHTNINGD_CHANNEL_COMMIT_TX_H
|
||||
#define LIGHTNING_LIGHTNINGD_CHANNEL_COMMIT_TX_H
|
||||
#include "config.h"
|
||||
#include <bitcoin/pubkey.h>
|
||||
#include <common/htlc.h>
|
||||
|
@ -58,4 +58,4 @@ struct bitcoin_tx *commit_tx(const tal_t *ctx,
|
|||
u64 obscured_commitment_number,
|
||||
enum side side);
|
||||
|
||||
#endif /* LIGHTNING_LIGHTNINGD_COMMIT_TX_H */
|
||||
#endif /* LIGHTNING_LIGHTNINGD_CHANNEL_COMMIT_TX_H */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* This is the full channel routines, with HTLC support. */
|
||||
#ifndef LIGHTNING_LIGHTNINGD_CHANNEL_H
|
||||
#define LIGHTNING_LIGHTNINGD_CHANNEL_H
|
||||
#ifndef LIGHTNING_LIGHTNINGD_CHANNEL_FULL_CHANNEL_H
|
||||
#define LIGHTNING_LIGHTNINGD_CHANNEL_FULL_CHANNEL_H
|
||||
#include "config.h"
|
||||
#include <common/initial_channel.h>
|
||||
#include <common/sphinx.h>
|
||||
|
@ -275,4 +275,4 @@ bool channel_force_htlcs(struct channel *channel,
|
|||
* Uses status_trace() on every HTLC.
|
||||
*/
|
||||
void dump_htlcs(const struct channel *channel, const char *prefix);
|
||||
#endif /* LIGHTNING_DAEMON_CHANNEL_H */
|
||||
#endif /* LIGHTNING_LIGHTNINGD_CHANNEL_FULL_CHANNEL_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef PETTYCOIN_DNS_H
|
||||
#define PETTYCOIN_DNS_H
|
||||
#ifndef LIGHTNING_LIGHTNINGD_DNS_H
|
||||
#define LIGHTNING_LIGHTNINGD_DNS_H
|
||||
#include "config.h"
|
||||
#include <ccan/io/io.h>
|
||||
#include <ccan/tal/tal.h>
|
||||
|
@ -50,4 +50,4 @@ struct dns_async *multiaddress_connect_(struct lightningd_state *dstate,
|
|||
void (*fail)(struct lightningd_state *, void *arg),
|
||||
void *arg);
|
||||
|
||||
#endif /* PETTYCOIN_DNS_H */
|
||||
#endif /* LIGHTNING_LIGHTNINGD_DNS_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_DAEMON_BROADCAST_H
|
||||
#define LIGHTNING_DAEMON_BROADCAST_H
|
||||
#ifndef LIGHTNING_LIGHTNINGD_GOSSIP_BROADCAST_H
|
||||
#define LIGHTNING_LIGHTNINGD_GOSSIP_BROADCAST_H
|
||||
#include "config.h"
|
||||
|
||||
#include <ccan/intmap/intmap.h>
|
||||
|
@ -37,4 +37,4 @@ void queue_broadcast(struct broadcast_state *bstate,
|
|||
|
||||
struct queued_message *next_broadcast_message(struct broadcast_state *bstate, u64 *last_index);
|
||||
|
||||
#endif /* LIGHTNING_DAEMON_BROADCAST_H */
|
||||
#endif /* LIGHTNING_LIGHTNINGD_GOSSIP_BROADCAST_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_DAEMON_ROUTING_H
|
||||
#define LIGHTNING_DAEMON_ROUTING_H
|
||||
#ifndef LIGHTNING_LIGHTNINGD_GOSSIP_ROUTING_H
|
||||
#define LIGHTNING_LIGHTNINGD_GOSSIP_ROUTING_H
|
||||
#include "config.h"
|
||||
#include <bitcoin/pubkey.h>
|
||||
#include <ccan/htable/htable_type.h>
|
||||
|
@ -175,4 +175,4 @@ struct route_hop *get_route(tal_t *ctx, struct routing_state *rstate,
|
|||
* the direction bit the matching channel should get */
|
||||
#define get_channel_direction(from, to) (pubkey_cmp(from, to) > 0)
|
||||
|
||||
#endif /* LIGHTNING_DAEMON_ROUTING_H */
|
||||
#endif /* LIGHTNING_LIGHTNINGD_GOSSIP_ROUTING_H */
|
||||
|
|
|
@ -6,4 +6,4 @@
|
|||
struct lightningd;
|
||||
|
||||
void gossip_init(struct lightningd *ld);
|
||||
#endif /* LIGHTNING_LIGHTNINGD_HSM_CONTROL_H */
|
||||
#endif /* LIGHTNING_LIGHTNINGD_GOSSIP_CONTROL_H */
|
||||
|
|
|
@ -33,4 +33,4 @@ void fromwire_gossip_getchannels_entry(const u8 **pptr, size_t *max,
|
|||
void towire_gossip_getchannels_entry(
|
||||
u8 **pptr, const struct gossip_getchannels_entry *entry);
|
||||
|
||||
#endif /* LIGHTNING_LIGHTGNINGD_GOSSIP_MSG_H */
|
||||
#endif /* LIGHTNING_LIGHTNINGD_GOSSIP_MSG_H */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* API to ask the HSM for things. */
|
||||
#ifndef LIGHTNING_LIGHTNINGD_HSM_H
|
||||
#define LIGHTNING_LIGHTNINGD_HSM_H
|
||||
#ifndef LIGHTNING_LIGHTNINGD_HSM_CLIENT_H
|
||||
#define LIGHTNING_LIGHTNINGD_HSM_CLIENT_H
|
||||
#include "config.h"
|
||||
#include <ccan/endian/endian.h>
|
||||
#include <ccan/short_types/short_types.h>
|
||||
|
@ -14,4 +14,4 @@ void hsm_setup(int fd);
|
|||
|
||||
/* Do ECDH using this node id secret. */
|
||||
bool hsm_do_ecdh(struct secret *ss, const struct pubkey *point);
|
||||
#endif /* LIGHTNING_LIGHTNINGD_HSM_H */
|
||||
#endif /* LIGHTNING_LIGHTNINGD_HSM_CLIENT_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_DAEMON_INVOICE_H
|
||||
#define LIGHTNING_DAEMON_INVOICE_H
|
||||
#ifndef LIGHTNING_LIGHTNINGD_INVOICE_H
|
||||
#define LIGHTNING_LIGHTNINGD_INVOICE_H
|
||||
#include "config.h"
|
||||
#include <bitcoin/preimage.h>
|
||||
#include <ccan/crypto/sha256/sha256.h>
|
||||
|
@ -33,4 +33,4 @@ struct invoice *find_unpaid(struct invoices *i,
|
|||
const struct sha256 *rhash);
|
||||
|
||||
struct invoices *invoices_init(const tal_t *ctx);
|
||||
#endif /* LIGHTNING_DAEMON_INVOICE_H */
|
||||
#endif /* LIGHTNING_LIGHTNINGD_INVOICE_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_DAEMON_JSONRPC_H
|
||||
#define LIGHTNING_DAEMON_JSONRPC_H
|
||||
#ifndef LIGHTNING_LIGHTNINGD_JSONRPC_H
|
||||
#define LIGHTNING_LIGHTNINGD_JSONRPC_H
|
||||
#include "config.h"
|
||||
#include <ccan/autodata/autodata.h>
|
||||
#include <ccan/list/list.h>
|
||||
|
@ -73,4 +73,4 @@ void json_add_address(struct json_result *response, const char *fieldname,
|
|||
void setup_jsonrpc(struct lightningd_state *dstate, const char *rpc_filename);
|
||||
|
||||
AUTODATA_TYPE(json_command, struct json_command);
|
||||
#endif /* LIGHTNING_DAEMON_JSONRPC_H */
|
||||
#endif /* LIGHTNING_LIGHTNINGD_JSONRPC_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_DAEMON_LOG_H
|
||||
#define LIGHTNING_DAEMON_LOG_H
|
||||
#ifndef LIGHTNING_LIGHTNINGD_LOG_H
|
||||
#define LIGHTNING_LIGHTNINGD_LOG_H
|
||||
#include "config.h"
|
||||
#include <ccan/tal/tal.h>
|
||||
#include <ccan/typesafe_cb/typesafe_cb.h>
|
||||
|
@ -132,4 +132,4 @@ void crashlog_activate(struct log *log);
|
|||
|
||||
/* Before the crashlog is activated, just prints to stderr. */
|
||||
void NORETURN PRINTF_FMT(1,2) fatal(const char *fmt, ...);
|
||||
#endif /* LIGHTNING_DAEMON_LOG_H */
|
||||
#endif /* LIGHTNING_LIGHTNINGD_LOG_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_DAEMON_NETADDR_H
|
||||
#define LIGHTNING_DAEMON_NETADDR_H
|
||||
#ifndef LIGHTNING_LIGHTNINGD_NETADDR_H
|
||||
#define LIGHTNING_LIGHTNINGD_NETADDR_H
|
||||
#include "config.h"
|
||||
#include <ccan/tal/tal.h>
|
||||
#include <netinet/in.h>
|
||||
|
@ -31,4 +31,4 @@ bool netaddr_from_fd(int fd, int type, int protocol, struct netaddr *a);
|
|||
bool netaddr_from_blob(const void *linear, size_t len, struct netaddr *a);
|
||||
char *netaddr_to_hex(const tal_t *ctx, const struct netaddr *a);
|
||||
|
||||
#endif /* LIGHTNING_DAEMON_NETADDR_H */
|
||||
#endif /* LIGHTNING_LIGHTNINGD_NETADDR_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_LIGHTNINGD_ONCHAIN_TYPES_H
|
||||
#define LIGHTNING_LIGHTNINGD_ONCHAIN_TYPES_H
|
||||
#ifndef LIGHTNING_LIGHTNINGD_ONCHAIN_ONCHAIN_TYPES_H
|
||||
#define LIGHTNING_LIGHTNINGD_ONCHAIN_ONCHAIN_TYPES_H
|
||||
#include "config.h"
|
||||
|
||||
/* Different transactions we care about. */
|
||||
|
@ -51,4 +51,4 @@ enum output_type {
|
|||
};
|
||||
|
||||
|
||||
#endif /* LIGHTNING_LIGHTNINGD_ONCHAIN_TYPES_H */
|
||||
#endif /* LIGHTNING_LIGHTNINGD_ONCHAIN_ONCHAIN_TYPES_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_LIGHTNINGD_ONCHAIN_WIRE_H
|
||||
#define LIGHTNING_LIGHTNINGD_ONCHAIN_WIRE_H
|
||||
#ifndef LIGHTNING_LIGHTNINGD_ONCHAIN_ONCHAIN_WIRE_H
|
||||
#define LIGHTNING_LIGHTNINGD_ONCHAIN_ONCHAIN_WIRE_H
|
||||
#include "config.h"
|
||||
#include <ccan/short_types/short_types.h>
|
||||
#include <ccan/tal/tal.h>
|
||||
|
@ -15,4 +15,4 @@ struct htlc_stub {
|
|||
void towire_htlc_stub(u8 **pptr, const struct htlc_stub *htlc_stub);
|
||||
void fromwire_htlc_stub(const u8 **cursor, size_t *max,
|
||||
struct htlc_stub *htlc_stub);
|
||||
#endif /* LIGHTNING_LIGHTNINGD_ONCHAIN_WIRE_H */
|
||||
#endif /* LIGHTNING_LIGHTNINGD_ONCHAIN_ONCHAIN_WIRE_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_DAEMON_OPT_TIME_H
|
||||
#define LIGHTNING_DAEMON_OPT_TIME_H
|
||||
#ifndef LIGHTNING_LIGHTNINGD_OPT_TIME_H
|
||||
#define LIGHTNING_LIGHTNINGD_OPT_TIME_H
|
||||
#include "config.h"
|
||||
#include <ccan/opt/opt.h>
|
||||
#include <ccan/time/time.h>
|
||||
|
@ -10,4 +10,4 @@ void opt_show_time(char buf[OPT_SHOW_LEN], const struct timerel *t);
|
|||
char *opt_set_timeabs(const char *arg, struct timeabs *t);
|
||||
void opt_show_timeabs(char buf[OPT_SHOW_LEN], const struct timeabs *t);
|
||||
|
||||
#endif /* LIGHTNING_DAEMON_OPT_TIME_H */
|
||||
#endif /* LIGHTNING_LIGHTNINGD_OPT_TIME_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_DAEMON_OPTIONS_H
|
||||
#define LIGHTNING_DAEMON_OPTIONS_H
|
||||
#ifndef LIGHTNING_LIGHTNINGD_OPTIONS_H
|
||||
#define LIGHTNING_LIGHTNINGD_OPTIONS_H
|
||||
#include "config.h"
|
||||
#include <ccan/tal/tal.h>
|
||||
|
||||
|
@ -13,4 +13,4 @@ void register_opts(struct lightningd_state *dstate);
|
|||
*/
|
||||
bool handle_opts(struct lightningd_state *dstate, int argc, char *argv[]);
|
||||
|
||||
#endif /* LIGHTNING_DAEMON_OPTIONS_H */
|
||||
#endif /* LIGHTNING_LIGHTNINGD_OPTIONS_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LIGHTNING_DAEMON_WATCH_H
|
||||
#define LIGHTNING_DAEMON_WATCH_H
|
||||
#ifndef LIGHTNING_LIGHTNINGD_WATCH_H
|
||||
#define LIGHTNING_LIGHTNINGD_WATCH_H
|
||||
#include "config.h"
|
||||
#include "bitcoin/shadouble.h"
|
||||
#include <ccan/crypto/ripemd160/ripemd160.h>
|
||||
|
@ -148,4 +148,4 @@ bool watching_txid(const struct chain_topology *topo,
|
|||
const struct sha256_double *txid);
|
||||
|
||||
void watch_topology_changed(struct chain_topology *topo);
|
||||
#endif /* LIGHTNING_DAEMON_WATCH_H */
|
||||
#endif /* LIGHTNING_LIGHTNINGD_WATCH_H */
|
||||
|
|
Loading…
Add table
Reference in a new issue