From e012e94ab2940c4622e44d0e97d958ec6ce708b4 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 20 Sep 2018 12:36:42 +0930 Subject: [PATCH] hsmd: rename hsm_client_wire_csv to hsm_wire.csv That matches the other CSV names (HSM was the first, so it was written before the pattern emerged). Signed-off-by: Rusty Russell --- channeld/Makefile | 2 +- channeld/channeld.c | 6 +++--- closingd/Makefile | 2 +- closingd/closingd.c | 2 +- common/bolt11.c | 2 +- connectd/Makefile | 2 +- connectd/connectd.c | 2 +- gossipd/Makefile | 2 +- gossipd/gossipd.c | 2 +- hsmd/Makefile | 12 +++--------- hsmd/{hsm_client_wire_csv => hsm_wire.csv} | 0 hsmd/hsmd.c | 6 +++--- lightningd/Makefile | 2 +- lightningd/channel.c | 2 +- lightningd/channel_control.c | 2 +- lightningd/connect_control.c | 2 +- lightningd/gossip_control.c | 2 +- lightningd/hsm_control.c | 4 ++-- lightningd/invoice.c | 2 +- lightningd/onchain_control.c | 2 +- lightningd/opening_control.c | 2 +- lightningd/peer_control.c | 2 +- onchaind/Makefile | 2 +- onchaind/onchaind.c | 2 +- openingd/Makefile | 2 +- openingd/openingd.c | 2 +- wallet/walletrpc.c | 2 +- 27 files changed, 33 insertions(+), 39 deletions(-) rename hsmd/{hsm_client_wire_csv => hsm_wire.csv} (100%) diff --git a/channeld/Makefile b/channeld/Makefile index d68f6a18f..1739a1cf0 100644 --- a/channeld/Makefile +++ b/channeld/Makefile @@ -72,7 +72,7 @@ CHANNELD_COMMON_OBJS := \ common/wire_error.o \ common/wireaddr.o \ gossipd/gen_gossip_wire.o \ - hsmd/gen_hsm_client_wire.o \ + hsmd/gen_hsm_wire.o \ lightningd/gossip_msg.o \ wire/fromwire.o \ wire/towire.o diff --git a/channeld/channeld.c b/channeld/channeld.c index 028228ac4..3cdd3b180 100644 --- a/channeld/channeld.c +++ b/channeld/channeld.c @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include #include #include @@ -223,14 +223,14 @@ static const u8 *hsm_req(const tal_t *ctx, const u8 *req TAKES) if (!wire_sync_write(HSM_FD, req)) status_failed(STATUS_FAIL_HSM_IO, "Writing %s to HSM: %s", - hsm_client_wire_type_name(type), + hsm_wire_type_name(type), strerror(errno)); msg = wire_sync_read(ctx, HSM_FD); if (!msg) status_failed(STATUS_FAIL_HSM_IO, "Reading resp to %s: %s", - hsm_client_wire_type_name(type), + hsm_wire_type_name(type), strerror(errno)); return msg; diff --git a/closingd/Makefile b/closingd/Makefile index 32279bbd4..d3a0ab666 100644 --- a/closingd/Makefile +++ b/closingd/Makefile @@ -72,7 +72,7 @@ CLOSINGD_COMMON_OBJS := \ common/wire_error.o \ common/wireaddr.o \ gossipd/gen_gossip_wire.o \ - hsmd/gen_hsm_client_wire.o \ + hsmd/gen_hsm_wire.o \ lightningd/gossip_msg.o closingd/gen_closing_wire.h: $(WIRE_GEN) closingd/closing_wire.csv diff --git a/closingd/closingd.c b/closingd/closingd.c index bef2e9886..eb19badae 100644 --- a/closingd/closingd.c +++ b/closingd/closingd.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/common/bolt11.c b/common/bolt11.c index c3e42be5c..3bb23ab3e 100644 --- a/common/bolt11.c +++ b/common/bolt11.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/connectd/Makefile b/connectd/Makefile index d3eacb9bb..516863f19 100644 --- a/connectd/Makefile +++ b/connectd/Makefile @@ -61,7 +61,7 @@ CONNECTD_COMMON_OBJS := \ common/wireaddr.o \ common/wire_error.o \ gossipd/gen_gossip_wire.o \ - hsmd/gen_hsm_client_wire.o \ + hsmd/gen_hsm_wire.o \ lightningd/gossip_msg.o \ wire/gen_onion_wire.o diff --git a/connectd/connectd.c b/connectd/connectd.c index fc97bab8b..a6c6c46bd 100644 --- a/connectd/connectd.c +++ b/connectd/connectd.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/gossipd/Makefile b/gossipd/Makefile index cdb1e122c..2855eb0b2 100644 --- a/gossipd/Makefile +++ b/gossipd/Makefile @@ -61,7 +61,7 @@ GOSSIPD_COMMON_OBJS := \ common/wireaddr.o \ common/wire_error.o \ connectd/gen_connect_gossip_wire.o \ - hsmd/gen_hsm_client_wire.o \ + hsmd/gen_hsm_wire.o \ lightningd/gossip_msg.o \ wire/gen_onion_wire.o diff --git a/gossipd/gossipd.c b/gossipd/gossipd.c index a05025303..7d1d6247d 100644 --- a/gossipd/gossipd.c +++ b/gossipd/gossipd.c @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/hsmd/Makefile b/hsmd/Makefile index dbc5a17c9..ad3eff3b8 100644 --- a/hsmd/Makefile +++ b/hsmd/Makefile @@ -7,8 +7,8 @@ hsmd-wrongdir: default: hsmd-all LIGHTNINGD_HSM_SRC := hsmd/hsmd.c \ - hsmd/gen_hsm_client_wire.c -LIGHTNINGD_HSM_HEADERS := hsmd/gen_hsm_client_wire.h + hsmd/gen_hsm_wire.c +LIGHTNINGD_HSM_HEADERS := hsmd/gen_hsm_wire.h LIGHTNINGD_HSM_OBJS := $(LIGHTNINGD_HSM_SRC:.c=.o) # Common source we use. @@ -41,18 +41,12 @@ $(LIGHTNINGD_HSM_OBJS): $(LIGHTNINGD_HEADERS) # Make sure these depend on everything. ALL_OBJS += $(LIGHTNINGD_HSM_OBJS) ALL_PROGRAMS += lightningd/lightning_hsmd -ALL_GEN_HEADERS += hsmd/gen_hsm_client_wire.h +ALL_GEN_HEADERS += hsmd/gen_hsm_wire.h hsmd-all: lightningd/lightning_hsmd lightningd/lightning_hsmd: $(LIGHTNINGD_HSM_OBJS) $(LIGHTNINGD_LIB_OBJS) $(HSMD_COMMON_OBJS) $(BITCOIN_OBJS) $(WIRE_OBJS) -hsmd/gen_hsm_client_wire.h: $(WIRE_GEN) hsmd/hsm_client_wire_csv - $(WIRE_GEN) --header $@ hsm_client_wire_type < hsmd/hsm_client_wire_csv > $@ - -hsmd/gen_hsm_client_wire.c: $(WIRE_GEN) hsmd/hsm_client_wire_csv - $(WIRE_GEN) ${@:.c=.h} hsm_client_wire_type< hsmd/hsm_client_wire_csv > $@ - hsmd/gen_hsm_wire.h: $(WIRE_GEN) hsmd/hsm_wire.csv $(WIRE_GEN) --header $@ hsm_wire_type < hsmd/hsm_wire.csv > $@ diff --git a/hsmd/hsm_client_wire_csv b/hsmd/hsm_wire.csv similarity index 100% rename from hsmd/hsm_client_wire_csv rename to hsmd/hsm_wire.csv diff --git a/hsmd/hsmd.c b/hsmd/hsmd.c index 3b187536d..8dea14dd2 100644 --- a/hsmd/hsmd.c +++ b/hsmd/hsmd.c @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include @@ -1131,7 +1131,7 @@ static struct io_plan *handle_sign_node_announcement(struct io_conn *conn, } static bool check_client_capabilities(struct client *client, - enum hsm_client_wire_type t) + enum hsm_wire_type t) { switch (t) { case WIRE_HSM_ECDH_REQ: @@ -1193,7 +1193,7 @@ static struct io_plan *handle_client(struct io_conn *conn, struct daemon_conn *dc) { struct client *c = container_of(dc, struct client, dc); - enum hsm_client_wire_type t = fromwire_peektype(dc->msg_in); + enum hsm_wire_type t = fromwire_peektype(dc->msg_in); status_debug("Client: Received message %d from client", t); diff --git a/lightningd/Makefile b/lightningd/Makefile index 9508dfe62..eb37128f4 100644 --- a/lightningd/Makefile +++ b/lightningd/Makefile @@ -49,7 +49,7 @@ LIGHTNINGD_COMMON_OBJS := \ common/wire_error.o \ common/wireaddr.o \ common/withdraw_tx.o \ - hsmd/gen_hsm_client_wire.o + hsmd/gen_hsm_wire.o LIGHTNINGD_SRC := \ lightningd/bitcoind.c \ diff --git a/lightningd/channel.c b/lightningd/channel.c index 0b792d802..a0f6443b2 100644 --- a/lightningd/channel.c +++ b/lightningd/channel.c @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/lightningd/channel_control.c b/lightningd/channel_control.c index 6bcb636b5..3f68317af 100644 --- a/lightningd/channel_control.c +++ b/lightningd/channel_control.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/lightningd/connect_control.c b/lightningd/connect_control.c index 31b5a05a8..1c6c38489 100644 --- a/lightningd/connect_control.c +++ b/lightningd/connect_control.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/lightningd/gossip_control.c b/lightningd/gossip_control.c index 39e91ad4c..88644231c 100644 --- a/lightningd/gossip_control.c +++ b/lightningd/gossip_control.c @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/lightningd/hsm_control.c b/lightningd/hsm_control.c index 96b1f112a..e609de96f 100644 --- a/lightningd/hsm_control.c +++ b/lightningd/hsm_control.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include @@ -71,7 +71,7 @@ void hsm_init(struct lightningd *ld) err(1, "Could not create hsm socketpair"); ld->hsm = new_global_subd(ld, "lightning_hsmd", - hsm_client_wire_type_name, + hsm_wire_type_name, hsm_msg, take(&fds[1]), NULL); if (!ld->hsm) diff --git a/lightningd/invoice.c b/lightningd/invoice.c index c5e229347..31d746b1b 100644 --- a/lightningd/invoice.c +++ b/lightningd/invoice.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/lightningd/onchain_control.c b/lightningd/onchain_control.c index 3f29f4b45..d8d8ab553 100644 --- a/lightningd/onchain_control.c +++ b/lightningd/onchain_control.c @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/lightningd/opening_control.c b/lightningd/opening_control.c index 8d4389084..433d4a3cf 100644 --- a/lightningd/opening_control.c +++ b/lightningd/opening_control.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/lightningd/peer_control.c b/lightningd/peer_control.c index 4dc9fa945..033c746d4 100644 --- a/lightningd/peer_control.c +++ b/lightningd/peer_control.c @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/onchaind/Makefile b/onchaind/Makefile index e2d76695b..d9146f394 100644 --- a/onchaind/Makefile +++ b/onchaind/Makefile @@ -69,7 +69,7 @@ ONCHAIND_COMMON_OBJS := \ common/utils.o \ common/utxo.o \ common/version.o \ - hsmd/gen_hsm_client_wire.o + hsmd/gen_hsm_wire.o onchaind/gen_onchain_wire.h: $(WIRE_GEN) onchaind/onchain_wire.csv $(WIRE_GEN) --header $@ onchain_wire_type < onchaind/onchain_wire.csv > $@ diff --git a/onchaind/onchaind.c b/onchaind/onchaind.c index ce7801a13..af1e3d733 100644 --- a/onchaind/onchaind.c +++ b/onchaind/onchaind.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/openingd/Makefile b/openingd/Makefile index 33cbea1c0..893efb156 100644 --- a/openingd/Makefile +++ b/openingd/Makefile @@ -70,7 +70,7 @@ OPENINGD_COMMON_OBJS := \ common/wire_error.o \ common/wireaddr.o \ gossipd/gen_gossip_wire.o \ - hsmd/gen_hsm_client_wire.o \ + hsmd/gen_hsm_wire.o \ lightningd/gossip_msg.o $(LIGHTNINGD_OPENING_OBJS): $(LIGHTNINGD_HEADERS) diff --git a/openingd/openingd.c b/openingd/openingd.c index dbcca1692..4478f545d 100644 --- a/openingd/openingd.c +++ b/openingd/openingd.c @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/wallet/walletrpc.c b/wallet/walletrpc.c index 32bcbc562..2e0ad1c1f 100644 --- a/wallet/walletrpc.c +++ b/wallet/walletrpc.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include