Browse Source

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>
ppa-0.6.1
Rusty Russell 8 years ago
parent
commit
4bf398c4e7
  1. 2
      Makefile
  2. 1
      lightningd/Makefile
  3. 2
      lightningd/channel.c
  4. 2
      lightningd/channel/channel.c
  5. 2
      lightningd/crypto_sync.c
  6. 2
      lightningd/cryptomsg.c
  7. 2
      lightningd/gossip/gossip.c
  8. 2
      lightningd/handshake/handshake.c
  9. 2
      lightningd/handshake/test/run-handshake.c
  10. 2
      lightningd/hsm/hsm.c
  11. 2
      lightningd/opening/opening.c
  12. 2
      lightningd/peer_failed.c
  13. 0
      lightningd/status.c
  14. 6
      lightningd/status.h
  15. 2
      lightningd/subd.c
  16. 2
      lightningd/test/run-channel.c
  17. 2
      lightningd/test/run-cryptomsg.c

2
Makefile

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

1
lightningd/Makefile

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

2
lightningd/channel.c

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

2
lightningd/channel/channel.c

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

2
lightningd/crypto_sync.c

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

2
lightningd/cryptomsg.c

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

2
lightningd/gossip/gossip.c

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

2
lightningd/handshake/handshake.c

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

2
lightningd/handshake/test/run-handshake.c

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

2
lightningd/hsm/hsm.c

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

2
lightningd/opening/opening.c

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

2
lightningd/peer_failed.c

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

0
status.c → lightningd/status.c

6
status.h → lightningd/status.h

@ -1,5 +1,5 @@
#ifndef LIGHTNING_STATUS_H #ifndef LIGHTNING_LIGHTNINGD_STATUS_H
#define LIGHTNING_STATUS_H #define LIGHTNING_LIGHTNINGD_STATUS_H
#include "config.h" #include "config.h"
#include <ccan/compiler/compiler.h> #include <ccan/compiler/compiler.h>
#include <ccan/short_types/short_types.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. */ /* Send a failure status code with printf-style msg, and exit. */
void status_failed(u16 code, const char *fmt, ...) PRINTF_FMT(2,3) NORETURN; void status_failed(u16 code, const char *fmt, ...) PRINTF_FMT(2,3) NORETURN;
#endif /* LIGHTNING_STATUS_H */ #endif /* LIGHTNING_LIGHTNINGD_STATUS_H */

2
lightningd/subd.c

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

2
lightningd/test/run-channel.c

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

2
lightningd/test/run-cryptomsg.c

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

Loading…
Cancel
Save