status: move into lightningd/status.

It's really a lightningd-only thing, and we're about to do surgery on it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2017-03-20 06:54:12 +10:30
parent 1b0dc7414c
commit 4bf398c4e7
17 changed files with 17 additions and 18 deletions

View File

@ -46,7 +46,6 @@ BITCOIN_OBJS := $(BITCOIN_SRC:.c=.o)
CORE_SRC := \
opt_bits.c \
status.c \
type_to_string.c \
utils.c \
version.c
@ -188,7 +187,6 @@ CORE_HEADERS := irc.h \
opt_bits.h \
overflows.h \
protobuf_convert.h \
status.h \
type_to_string.h \
utils.h \
version.h

View File

@ -50,6 +50,7 @@ LIGHTNINGD_LIB_SRC := \
lightningd/key_derive.c \
lightningd/msg_queue.c \
lightningd/peer_failed.c \
lightningd/status.c \
lightningd/utxo.c
LIGHTNINGD_LIB_OBJS := $(LIGHTNINGD_LIB_SRC:.c=.o)

View File

@ -11,7 +11,7 @@
#include <inttypes.h>
#include <lightningd/channel_config.h>
#include <lightningd/key_derive.h>
#include <status.h>
#include <lightningd/status.h>
#include <string.h>
static void htlc_arr_append(const struct htlc ***arr, const struct htlc *htlc)

View File

@ -21,9 +21,9 @@
#include <lightningd/key_derive.h>
#include <lightningd/msg_queue.h>
#include <lightningd/peer_failed.h>
#include <lightningd/status.h>
#include <secp256k1.h>
#include <signal.h>
#include <status.h>
#include <stdio.h>
#include <type_to_string.h>
#include <version.h>

View File

@ -3,7 +3,7 @@
#include <inttypes.h>
#include <lightningd/crypto_sync.h>
#include <lightningd/cryptomsg.h>
#include <status.h>
#include <lightningd/status.h>
#include <utils.h>
#include <wire/wire_sync.h>

View File

@ -7,8 +7,8 @@
#include <ccan/short_types/short_types.h>
#include <ccan/take/take.h>
#include <lightningd/cryptomsg.h>
#include <lightningd/status.h>
#include <sodium/crypto_aead_chacha20poly1305.h>
#include <status.h>
#include <utils.h>
#include <wire/wire.h>
#include <wire/wire_io.h>

View File

@ -21,9 +21,9 @@
#include <lightningd/debug.h>
#include <lightningd/gossip/gen_gossip_wire.h>
#include <lightningd/gossip_msg.h>
#include <lightningd/status.h>
#include <secp256k1_ecdh.h>
#include <sodium/randombytes.h>
#include <status.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/types.h>

View File

@ -1,4 +1,3 @@
#include "status.h"
#include "type_to_string.h"
#include <assert.h>
#include <bitcoin/privkey.h>
@ -13,6 +12,7 @@
#include <lightningd/debug.h>
#include <lightningd/handshake/gen_handshake_wire.h>
#include <lightningd/hsm/client.h>
#include <lightningd/status.h>
#include <secp256k1.h>
#include <secp256k1_ecdh.h>
#include <sodium/crypto_aead_chacha20poly1305.h>

View File

@ -7,7 +7,7 @@
#include <ccan/err/err.h>
#include <ccan/read_write_all/read_write_all.h>
#include <ccan/structeq/structeq.h>
#include "status.h"
#include <lightningd/status.h>
/* Since we use pipes, we need different fds for read and write. */
static int read_fd, write_fd;

View File

@ -19,10 +19,10 @@
#include <lightningd/hsm/client.h>
#include <lightningd/hsm/gen_hsm_client_wire.h>
#include <lightningd/hsm/gen_hsm_wire.h>
#include <lightningd/status.h>
#include <permute_tx.h>
#include <secp256k1_ecdh.h>
#include <sodium/randombytes.h>
#include <status.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/types.h>

View File

@ -15,9 +15,9 @@
#include <lightningd/key_derive.h>
#include <lightningd/opening/gen_opening_wire.h>
#include <lightningd/peer_failed.h>
#include <lightningd/status.h>
#include <secp256k1.h>
#include <signal.h>
#include <status.h>
#include <stdio.h>
#include <type_to_string.h>
#include <version.h>

View File

@ -2,7 +2,7 @@
#include <fcntl.h>
#include <lightningd/crypto_sync.h>
#include <lightningd/peer_failed.h>
#include <status.h>
#include <lightningd/status.h>
#include <stdarg.h>
#include <unistd.h>
#include <wire/gen_peer_wire.h>

View File

@ -1,5 +1,5 @@
#ifndef LIGHTNING_STATUS_H
#define LIGHTNING_STATUS_H
#ifndef LIGHTNING_LIGHTNINGD_STATUS_H
#define LIGHTNING_LIGHTNINGD_STATUS_H
#include "config.h"
#include <ccan/compiler/compiler.h>
#include <ccan/short_types/short_types.h>
@ -26,4 +26,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_STATUS_H */
#endif /* LIGHTNING_LIGHTNINGD_STATUS_H */

View File

@ -7,8 +7,8 @@
#include <errno.h>
#include <fcntl.h>
#include <lightningd/lightningd.h>
#include <lightningd/status.h>
#include <lightningd/subd.h>
#include <status.h>
#include <stdarg.h>
#include <sys/socket.h>
#include <sys/stat.h>

View File

@ -1,4 +1,4 @@
#include <status.h>
#include <lightningd/status.h>
#include <stdio.h>
#define status_trace(fmt , ...) \
printf(fmt "\n" , ## __VA_ARGS__)

View File

@ -1,7 +1,7 @@
#include <assert.h>
#include <ccan/str/hex/hex.h>
#include <ccan/tal/str/str.h>
#include <status.h>
#include <lightningd/status.h>
#include <stdio.h>
#include <wire/wire_io.h>