Browse Source

gossipd: convert wire to new scheme.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
bump-pyln-proto
Rusty Russell 4 years ago
parent
commit
dffbf8de85
  1. 2
      channeld/Makefile
  2. 2
      channeld/channeld.c
  3. 2
      closingd/Makefile
  4. 2
      closingd/closingd.c
  5. 2
      common/read_peer_msg.c
  6. 2
      connectd/Makefile
  7. 2
      connectd/connectd.c
  8. 8
      devtools/Makefile
  9. 2
      devtools/create-gossipstore.c
  10. 4
      devtools/dump-gossipstore.c
  11. 37
      gossipd/Makefile
  12. 2
      gossipd/gossip_generation.c
  13. 6
      gossipd/gossip_store.c
  14. 0
      gossipd/gossip_store_wire.csv
  15. 140
      gossipd/gossip_wire.csv
  16. 154
      gossipd/gossipd.c
  17. 0
      gossipd/gossipd_peerd_wire.csv
  18. 140
      gossipd/gossipd_wire.csv
  19. 6
      gossipd/queries.c
  20. 6
      gossipd/routing.c
  21. 6
      gossipd/test/run-crc32_of_update.c
  22. 6
      gossipd/test/run-extended-info.c
  23. 4
      lightningd/closing_control.c
  24. 96
      lightningd/gossip_control.c
  25. 6
      lightningd/invoice.c
  26. 6
      lightningd/memdump.c
  27. 4
      lightningd/pay.c
  28. 6
      lightningd/peer_htlcs.c
  29. 6
      lightningd/ping.c
  30. 6
      lightningd/signmessage.c
  31. 12
      lightningd/test/run-invoice-select-inchan.c
  32. 2
      openingd/Makefile
  33. 2
      openingd/openingd.c
  34. 12
      wallet/test/run-wallet.c

2
channeld/Makefile

@ -91,7 +91,7 @@ CHANNELD_COMMON_OBJS := \
common/version.o \
common/wire_error.o \
common/wireaddr.o \
gossipd/gen_gossip_peerd_wire.o \
gossipd/gossipd_peerd_wiregen.o \
lightningd/gossip_msg.o \
wire/fromwire.o \
wire/towire.o

2
channeld/channeld.c

@ -56,7 +56,7 @@
#include <common/wire_error.h>
#include <errno.h>
#include <fcntl.h>
#include <gossipd/gen_gossip_peerd_wire.h>
#include <gossipd/gossipd_peerd_wiregen.h>
#include <hsmd/hsmd_wiregen.h>
#include <inttypes.h>
#include <secp256k1.h>

2
closingd/Makefile

@ -82,7 +82,7 @@ CLOSINGD_COMMON_OBJS := \
common/version.o \
common/wire_error.o \
common/wireaddr.o \
gossipd/gen_gossip_peerd_wire.o
gossipd/gossipd_peerd_wiregen.o
closingd/gen_closing_wire.h: $(WIRE_GEN) closingd/closing_wire.csv
$(WIRE_GEN) --page header $@ closing_wire_type < closingd/closing_wire.csv > $@

2
closingd/closingd.c

@ -19,7 +19,7 @@
#include <common/version.h>
#include <common/wire_error.h>
#include <errno.h>
#include <gossipd/gen_gossip_peerd_wire.h>
#include <gossipd/gossipd_peerd_wiregen.h>
#include <hsmd/hsmd_wiregen.h>
#include <inttypes.h>
#include <stdio.h>

2
common/read_peer_msg.c

@ -11,7 +11,7 @@
#include <common/utils.h>
#include <common/wire_error.h>
#include <errno.h>
#include <gossipd/gen_gossip_peerd_wire.h>
#include <gossipd/gossipd_peerd_wiregen.h>
#include <sys/select.h>
#include <unistd.h>
#include <wire/peer_wire.h>

2
connectd/Makefile

@ -73,7 +73,7 @@ CONNECTD_COMMON_OBJS := \
common/version.o \
common/wireaddr.o \
common/wire_error.o \
gossipd/gen_gossip_wire.o \
gossipd/gossipd_wiregen.o \
lightningd/gossip_msg.o \
wire/gen_onion_wire.o

2
connectd/connectd.c

@ -52,7 +52,7 @@
#include <connectd/tor.h>
#include <connectd/tor_autoservice.h>
#include <errno.h>
#include <gossipd/gen_gossip_wire.h>
#include <gossipd/gossipd_wiregen.h>
#include <hsmd/hsmd_wiregen.h>
#include <inttypes.h>
#include <lightningd/gossip_msg.h>

8
devtools/Makefile

@ -58,12 +58,12 @@ devtools/bolt11-cli: $(DEVTOOLS_OBJS) $(DEVTOOLS_COMMON_OBJS) $(JSMN_OBJS) $(CCA
devtools/decodemsg: $(DEVTOOLS_OBJS) $(DEVTOOLS_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o devtools/decodemsg.o
devtools/dump-gossipstore: $(DEVTOOLS_OBJS) $(DEVTOOLS_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o devtools/dump-gossipstore.o gossipd/gen_gossip_store.o
devtools/dump-gossipstore: $(DEVTOOLS_OBJS) $(DEVTOOLS_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o devtools/dump-gossipstore.o gossipd/gossip_store_wiregen.o
devtools/dump-gossipstore.o: gossipd/gen_gossip_store.h
devtools/dump-gossipstore.o: gossipd/gossip_store_wiregen.h
devtools/create-gossipstore: $(DEVTOOLS_OBJS) $(DEVTOOLS_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o devtools/create-gossipstore.o gossipd/gen_gossip_store.o
devtools/create-gossipstore.o: gossipd/gen_gossip_store.h
devtools/create-gossipstore: $(DEVTOOLS_OBJS) $(DEVTOOLS_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o devtools/create-gossipstore.o gossipd/gossip_store_wiregen.o
devtools/create-gossipstore.o: gossipd/gossip_store_wiregen.h
devtools/onion.c: ccan/config.h

2
devtools/create-gossipstore.c

@ -9,7 +9,7 @@
#include <common/type_to_string.h>
#include <common/utils.h>
#include <fcntl.h>
#include <gossipd/gen_gossip_store.h>
#include <gossipd/gossip_store_wiregen.h>
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>

4
devtools/dump-gossipstore.c

@ -5,8 +5,8 @@
#include <common/utils.h>
#include <fcntl.h>
#include <common/gossip_store.h>
#include <gossipd/gen_gossip_peerd_wire.h>
#include <gossipd/gen_gossip_store.h>
#include <gossipd/gossipd_peerd_wiregen.h>
#include <gossipd/gossip_store_wiregen.h>
#include <inttypes.h>
#include <stdio.h>
#include <sys/stat.h>

37
gossipd/Makefile

@ -7,14 +7,14 @@ gossipd-wrongdir:
default: gossipd-all
# lightningd uses this:
LIGHTNINGD_GOSSIP_CONTROL_HEADERS := gossipd/gen_gossip_wire.h
LIGHTNINGD_GOSSIP_CONTROL_SRC := gossipd/gen_gossip_wire.c
LIGHTNINGD_GOSSIP_CONTROL_HEADERS := gossipd/gossipd_wiregen.h
LIGHTNINGD_GOSSIP_CONTROL_SRC := gossipd/gossipd_wiregen.c
LIGHTNINGD_GOSSIP_CONTROL_OBJS := $(LIGHTNINGD_GOSSIP_CONTROL_SRC:.c=.o)
# gossipd needs these:
LIGHTNINGD_GOSSIP_HEADERS_WSRC := gossipd/gen_gossip_wire.h \
gossipd/gen_gossip_peerd_wire.h \
gossipd/gen_gossip_store.h \
LIGHTNINGD_GOSSIP_HEADERS_WSRC := gossipd/gossipd_wiregen.h \
gossipd/gossipd_peerd_wiregen.h \
gossipd/gossip_store_wiregen.h \
gossipd/gossipd.h \
gossipd/gossip_store.h \
gossipd/queries.h \
@ -28,11 +28,11 @@ LIGHTNINGD_GOSSIP_OBJS := $(LIGHTNINGD_GOSSIP_SRC:.c=.o)
# Make sure these depend on everything.
ALL_OBJS += $(LIGHTNINGD_GOSSIP_OBJS)
ALL_PROGRAMS += lightningd/lightning_gossipd
ALL_GEN_HEADERS += gossipd/gen_gossip_wire.h gossipd/gen_gossip_peerd_wire.h
ALL_GEN_HEADERS += $(wildcard gossipd/*wiregen.h)
# For checking
LIGHTNINGD_GOSSIP_ALLSRC_NOGEN := $(filter-out gossipd/gen_%, $(LIGHTNINGD_GOSSIP_CLIENT_SRC) $(LIGHTNINGD_GOSSIP_SRC))
LIGHTNINGD_GOSSIP_ALLHEADERS_NOGEN := $(filter-out gossipd/gen_%, $(LIGHTNINGD_GOSSIP_CLIENT_HEADERS) $(LIGHTNINGD_GOSSIP_HEADERS))
LIGHTNINGD_GOSSIP_ALLSRC_NOGEN := $(filter-out gossipd/%wiregen.c, $(LIGHTNINGD_GOSSIP_CLIENT_SRC) $(LIGHTNINGD_GOSSIP_SRC))
LIGHTNINGD_GOSSIP_ALLHEADERS_NOGEN := $(filter-out gossipd/%wiregen.h, $(LIGHTNINGD_GOSSIP_CLIENT_HEADERS) $(LIGHTNINGD_GOSSIP_HEADERS))
# Add to headers which any object might need.
LIGHTNINGD_HEADERS_GEN += $(LIGHTNINGD_GOSSIP_HEADERS)
@ -88,25 +88,6 @@ gossipd-all: lightningd/lightning_gossipd $(LIGHTNINGD_GOSSIP_CLIENT_OBJS)
lightningd/lightning_gossipd: $(LIGHTNINGD_GOSSIP_OBJS) $(GOSSIPD_COMMON_OBJS) $(BITCOIN_OBJS) $(WIRE_OBJS) $(LIGHTNINGD_HSM_CLIENT_OBJS)
gossipd/gen_gossip_wire.h: $(WIRE_GEN) gossipd/gossip_wire.csv
$(WIRE_GEN) --page header $@ gossip_wire_type < gossipd/gossip_wire.csv > $@
gossipd/gen_gossip_wire.c: $(WIRE_GEN) gossipd/gossip_wire.csv
$(WIRE_GEN) --page impl ${@:.c=.h} gossip_wire_type < gossipd/gossip_wire.csv > $@
gossipd/gen_gossip_peerd_wire.h: $(WIRE_GEN) gossipd/gossip_peerd_wire.csv
$(WIRE_GEN) --page header $@ gossip_peerd_wire_type < gossipd/gossip_peerd_wire.csv > $@
gossipd/gen_gossip_peerd_wire.c: $(WIRE_GEN) gossipd/gossip_peerd_wire.csv
$(WIRE_GEN) --page impl ${@:.c=.h} gossip_peerd_wire_type < gossipd/gossip_peerd_wire.csv > $@
gossipd/gen_gossip_store.h: $(WIRE_GEN) gossipd/gossip_store.csv
$(WIRE_GEN) --page header $@ gossip_store_type < gossipd/gossip_store.csv > $@
gossipd/gen_gossip_store.c: $(WIRE_GEN) gossipd/gossip_store.csv
$(WIRE_GEN) --page impl ${@:.c=.h} gossip_store_type < gossipd/gossip_store.csv > $@
check-source: $(LIGHTNINGD_GOSSIP_ALLSRC_NOGEN:%=check-src-include-order/%) $(LIGHTNINGD_GOSSIP_ALLHEADERS_NOGEN:%=check-hdr-include-order/%)
check-source-bolt: $(LIGHTNINGD_GOSSIP_SRC:%=bolt-check/%) $(LIGHTNINGD_GOSSIP_HEADERS:%=bolt-check/%)
check-whitespace: $(LIGHTNINGD_GOSSIP_ALLSRC_NOGEN:%=check-whitespace/%) $(LIGHTNINGD_GOSSIP_ALLHEADERS_NOGEN:%=check-whitespace/%)
@ -114,6 +95,6 @@ check-whitespace: $(LIGHTNINGD_GOSSIP_ALLSRC_NOGEN:%=check-whitespace/%) $(LIGHT
clean: gossipd-clean
gossipd-clean:
$(RM) $(LIGHTNINGD_GOSSIP_OBJS) gossipd/gen_*
$(RM) $(LIGHTNINGD_GOSSIP_OBJS)
-include gossipd/test/Makefile

2
gossipd/gossip_generation.c

@ -9,10 +9,10 @@
#include <common/utils.h>
#include <common/wireaddr.h>
#include <errno.h>
#include <gossipd/gen_gossip_peerd_wire.h>
#include <gossipd/gossip_generation.h>
#include <gossipd/gossip_store.h>
#include <gossipd/gossipd.h>
#include <gossipd/gossipd_peerd_wiregen.h>
#include <hsmd/hsmd_wiregen.h>
#include <wire/gen_peer_wire.h>
#include <wire/wire_sync.h>

6
gossipd/gossip_store.c

@ -11,9 +11,9 @@
#include <common/utils.h>
#include <errno.h>
#include <fcntl.h>
#include <gossipd/gen_gossip_peerd_wire.h>
#include <gossipd/gen_gossip_store.h>
#include <gossipd/gen_gossip_wire.h>
#include <gossipd/gossip_store_wiregen.h>
#include <gossipd/gossipd_peerd_wiregen.h>
#include <gossipd/gossipd_wiregen.h>
#include <stdio.h>
#include <sys/stat.h>
#include <sys/uio.h>

0
gossipd/gossip_store.csv → gossipd/gossip_store_wire.csv

Can't render this file because it has a wrong number of fields in line 2.

140
gossipd/gossip_wire.csv

@ -1,140 +0,0 @@
#include <common/cryptomsg.h>
#include <common/features.h>
#include <common/wireaddr.h>
#include <wire/gen_onion_wire.h>
# Initialize the gossip daemon.
msgtype,gossipctl_init,3000
msgdata,gossipctl_init,chainparams,chainparams,
msgdata,gossipctl_init,our_features,feature_set,
msgdata,gossipctl_init,id,node_id,
msgdata,gossipctl_init,rgb,u8,3
msgdata,gossipctl_init,alias,u8,32
msgdata,gossipctl_init,num_announcable,u16,
msgdata,gossipctl_init,announcable,wireaddr,num_announcable
msgdata,gossipctl_init,dev_gossip_time,?u32,
msgdata,gossipctl_init,dev_fast_gossip,bool,
msgdata,gossipctl_init,dev_fast_gossip_prune,bool,
# In developer mode, we can mess with time.
msgtype,gossip_dev_set_time,3001
msgdata,gossip_dev_set_time,dev_gossip_time,u32,
# Pass JSON-RPC getnodes call through
msgtype,gossip_getnodes_request,3005
msgdata,gossip_getnodes_request,id,?node_id,
#include <lightningd/gossip_msg.h>
msgtype,gossip_getnodes_reply,3105
msgdata,gossip_getnodes_reply,num_nodes,u32,
msgdata,gossip_getnodes_reply,nodes,gossip_getnodes_entry,num_nodes
# Pass JSON-RPC getroute call through
msgtype,gossip_getroute_request,3006
# Source defaults to "us", and means we don't consider first-hop channel fees
msgdata,gossip_getroute_request,source,?node_id,
msgdata,gossip_getroute_request,destination,node_id,
msgdata,gossip_getroute_request,msatoshi,amount_msat,
msgdata,gossip_getroute_request,riskfactor_millionths,u64,
msgdata,gossip_getroute_request,final_cltv,u32,
msgdata,gossip_getroute_request,fuzz_millionths,u64,
msgdata,gossip_getroute_request,num_excluded,u16,
msgdata,gossip_getroute_request,excluded,exclude_entry,num_excluded
msgdata,gossip_getroute_request,max_hops,u32,
msgtype,gossip_getroute_reply,3106
msgdata,gossip_getroute_reply,num_hops,u16,
msgdata,gossip_getroute_reply,hops,route_hop,num_hops
msgtype,gossip_getchannels_request,3007
msgdata,gossip_getchannels_request,short_channel_id,?short_channel_id,
msgdata,gossip_getchannels_request,source,?node_id,
msgdata,gossip_getchannels_request,prev,?short_channel_id,
msgtype,gossip_getchannels_reply,3107
msgdata,gossip_getchannels_reply,complete,bool,
msgdata,gossip_getchannels_reply,num_channels,u32,
msgdata,gossip_getchannels_reply,nodes,gossip_getchannels_entry,num_channels
# Ping/pong test. Waits for a reply if it expects one.
msgtype,gossip_ping,3008
msgdata,gossip_ping,id,node_id,
msgdata,gossip_ping,num_pong_bytes,u16,
msgdata,gossip_ping,len,u16,
msgtype,gossip_ping_reply,3108
msgdata,gossip_ping_reply,id,node_id,
# False if id in gossip_ping was unknown.
msgdata,gossip_ping_reply,sent,bool,
# 0 == no pong expected
msgdata,gossip_ping_reply,totlen,u16,
# Set artificial maximum reply_channel_range size. Master->gossipd
msgtype,gossip_dev_set_max_scids_encode_size,3030
msgdata,gossip_dev_set_max_scids_encode_size,max,u32,
# Given a short_channel_id, return the latest (stripped) update for error msg.
msgtype,gossip_get_stripped_cupdate,3010
msgdata,gossip_get_stripped_cupdate,channel_id,short_channel_id,
msgtype,gossip_get_stripped_cupdate_reply,3110
msgdata,gossip_get_stripped_cupdate_reply,stripped_update_len,u16,
msgdata,gossip_get_stripped_cupdate_reply,stripped_update,u8,stripped_update_len
# gossipd->master: we're closing this channel.
msgtype,gossip_local_channel_close,3027
msgdata,gossip_local_channel_close,short_channel_id,short_channel_id,
# Gossipd->master get this tx output please.
msgtype,gossip_get_txout,3018
msgdata,gossip_get_txout,short_channel_id,short_channel_id,
# master->gossipd here is the output, or empty if none.
msgtype,gossip_get_txout_reply,3118
msgdata,gossip_get_txout_reply,short_channel_id,short_channel_id,
msgdata,gossip_get_txout_reply,satoshis,amount_sat,
msgdata,gossip_get_txout_reply,len,u16,
msgdata,gossip_get_txout_reply,outscript,u8,len
# master->gossipd an htlc failed with this onion error.
msgtype,gossip_payment_failure,3021
msgdata,gossip_payment_failure,len,u16,
msgdata,gossip_payment_failure,error,u8,len
# master -> gossipd: a potential funding outpoint was spent, please forget the eventual channel
msgtype,gossip_outpoint_spent,3024
msgdata,gossip_outpoint_spent,short_channel_id,short_channel_id,
# master -> gossipd: stop gossip timers.
msgtype,gossip_dev_suppress,3032
# master -> gossipd: do you have a memleak?
msgtype,gossip_dev_memleak,3033
msgtype,gossip_dev_memleak_reply,3133
msgdata,gossip_dev_memleak_reply,leak,bool,
# master -> gossipd: please rewrite the gossip_store
msgtype,gossip_dev_compact_store,3034
# gossipd -> master: ok
msgtype,gossip_dev_compact_store_reply,3134
msgdata,gossip_dev_compact_store_reply,success,bool,
#include <common/bolt11.h>
# master -> gossipd: get route_info for our incoming channels
msgtype,gossip_get_incoming_channels,3025
# gossipd -> master: here they are.
msgtype,gossip_get_incoming_channels_reply,3125
msgdata,gossip_get_incoming_channels_reply,num_public,u16,
msgdata,gossip_get_incoming_channels_reply,public_route_info,route_info,num_public
msgdata,gossip_get_incoming_channels_reply,public_deadends,bool,num_public
msgdata,gossip_get_incoming_channels_reply,num_private,u16,
msgdata,gossip_get_incoming_channels_reply,private_route_info,route_info,num_private
msgdata,gossip_get_incoming_channels_reply,private_deadends,bool,num_private
# master -> gossipd: blockheight increased.
msgtype,gossip_new_blockheight,3026
msgdata,gossip_new_blockheight,blockheight,u32,
Can't render this file because it has a wrong number of fields in line 7.

154
gossipd/gossipd.c

@ -45,10 +45,10 @@
#include <errno.h>
#include <fcntl.h>
#include <gossipd/broadcast.h>
#include <gossipd/gen_gossip_peerd_wire.h>
#include <gossipd/gen_gossip_wire.h>
#include <gossipd/gossip_generation.h>
#include <gossipd/gossipd.h>
#include <gossipd/gossipd_peerd_wiregen.h>
#include <gossipd/gossipd_wiregen.h>
#include <gossipd/queries.h>
#include <gossipd/routing.h>
#include <gossipd/seeker.h>
@ -249,7 +249,7 @@ static const u8 *handle_channel_announcement_msg(struct peer *peer,
tal_arr_expand(&peer->daemon->deferred_txouts, *scid);
} else {
daemon_conn_send(peer->daemon->master,
take(towire_gossip_get_txout(NULL,
take(towire_gossipd_get_txout(NULL,
scid)));
}
}
@ -331,7 +331,7 @@ static const u8 *handle_pong(struct peer *peer, const u8 *pong)
return towire_errorfmt(peer, NULL, "%s", err);
daemon_conn_send(peer->daemon->master,
take(towire_gossip_ping_reply(NULL, &peer->id, true,
take(towire_gossipd_ping_reply(NULL, &peer->id, true,
tal_count(pong))));
return NULL;
}
@ -497,8 +497,8 @@ static struct io_plan *peer_msg_in(struct io_conn *conn,
return io_close(conn);
}
/* Must be a gossip_peerd_wire_type asking us to do something. */
switch ((enum gossip_peerd_wire_type)fromwire_peektype(msg)) {
/* Must be a gossipd_peerd_wire_type asking us to do something. */
switch ((enum gossipd_peerd_wire)fromwire_peektype(msg)) {
case WIRE_GOSSIPD_GET_UPDATE:
ok = handle_get_local_channel_update(peer, msg);
goto handled_cmd;
@ -522,7 +522,7 @@ static struct io_plan *peer_msg_in(struct io_conn *conn,
/* Anything else should not have been sent to us: close on it */
status_peer_broken(&peer->id, "unexpected cmd of type %i %s",
fromwire_peektype(msg),
gossip_peerd_wire_type_name(fromwire_peektype(msg)));
gossipd_peerd_wire_name(fromwire_peektype(msg)));
return io_close(conn);
/* Commands should always be OK. */
@ -832,7 +832,7 @@ static struct io_plan *gossip_init(struct io_conn *conn,
bool dev_fast_gossip, dev_fast_gossip_prune;
u32 timestamp;
if (!fromwire_gossipctl_init(daemon, msg,
if (!fromwire_gossipd_init(daemon, msg,
&chainparams,
&daemon->our_features,
&daemon->id,
@ -842,7 +842,7 @@ static struct io_plan *gossip_init(struct io_conn *conn,
&dev_gossip_time,
&dev_fast_gossip,
&dev_fast_gossip_prune)) {
master_badmsg(WIRE_GOSSIPCTL_INIT, msg);
master_badmsg(WIRE_GOSSIPD_INIT, msg);
}
daemon->rstate = new_routing_state(daemon,
@ -907,10 +907,10 @@ static struct io_plan *getroute_req(struct io_conn *conn, struct daemon *daemon,
* for a route from ourselves (the usual case): in that case,
* we don't have to consider fees on our own outgoing channels.
*/
if (!fromwire_gossip_getroute_request(
if (!fromwire_gossipd_getroute_request(
msg, msg, &source, &destination, &msat, &riskfactor_millionths,
&final_cltv, &fuzz_millionths, &excluded, &max_hops))
master_badmsg(WIRE_GOSSIP_GETROUTE_REQUEST, msg);
master_badmsg(WIRE_GOSSIPD_GETROUTE_REQUEST, msg);
status_debug("Trying to find a route from %s to %s for %s",
source
@ -924,7 +924,7 @@ static struct io_plan *getroute_req(struct io_conn *conn, struct daemon *daemon,
fuzz_millionths / 1000000.0, pseudorand_u64(),
excluded, max_hops);
out = towire_gossip_getroute_reply(NULL,
out = towire_gossipd_getroute_reply(NULL,
cast_const2(const struct route_hop **,
hops));
daemon_conn_send(daemon->master, take(out));
@ -1045,9 +1045,9 @@ static struct io_plan *getchannels_req(struct io_conn *conn,
bool complete = true;
/* Note: scid is marked optional in gossip_wire.csv */
if (!fromwire_gossip_getchannels_request(msg, msg, &scid, &source,
if (!fromwire_gossipd_getchannels_request(msg, msg, &scid, &source,
&prev))
master_badmsg(WIRE_GOSSIP_GETCHANNELS_REQUEST, msg);
master_badmsg(WIRE_GOSSIPD_GETCHANNELS_REQUEST, msg);
entries = tal_arr(tmpctx, const struct gossip_getchannels_entry *, 0);
/* They can ask about a particular channel by short_channel_id */
@ -1083,7 +1083,7 @@ static struct io_plan *getchannels_req(struct io_conn *conn,
}
}
out = towire_gossip_getchannels_reply(NULL, complete, entries);
out = towire_gossipd_getchannels_reply(NULL, complete, entries);
daemon_conn_send(daemon->master, take(out));
return daemon_conn_read_next(conn, daemon->master);
}
@ -1119,8 +1119,8 @@ static struct io_plan *getnodes(struct io_conn *conn, struct daemon *daemon,
struct gossip_getnodes_entry *node_arr;
struct node_id *id;
if (!fromwire_gossip_getnodes_request(tmpctx, msg, &id))
master_badmsg(WIRE_GOSSIP_GETNODES_REQUEST, msg);
if (!fromwire_gossipd_getnodes_request(tmpctx, msg, &id))
master_badmsg(WIRE_GOSSIPD_GETNODES_REQUEST, msg);
/* Format of reply is the same whether they ask for a specific node
* (0 or one responses) or all nodes (0 or more) */
@ -1153,7 +1153,7 @@ static struct io_plan *getnodes(struct io_conn *conn, struct daemon *daemon,
tal_count(node_arr));
for (size_t i = 0; i < tal_count(node_arr); i++)
nodes[i] = &node_arr[i];
out = towire_gossip_getnodes_reply(NULL, nodes);
out = towire_gossipd_getnodes_reply(NULL, nodes);
daemon_conn_send(daemon->master, take(out));
return daemon_conn_read_next(conn, daemon->master);
}
@ -1168,8 +1168,8 @@ static struct io_plan *ping_req(struct io_conn *conn, struct daemon *daemon,
struct peer *peer;
u8 *ping;
if (!fromwire_gossip_ping(msg, &id, &num_pong_bytes, &len))
master_badmsg(WIRE_GOSSIP_PING, msg);
if (!fromwire_gossipd_ping(msg, &id, &num_pong_bytes, &len))
master_badmsg(WIRE_GOSSIPD_PING, msg);
/* Even if lightningd were to check for valid ids, there's a race
* where it might vanish before we read this command; cleaner to
@ -1177,7 +1177,7 @@ static struct io_plan *ping_req(struct io_conn *conn, struct daemon *daemon,
peer = find_peer(daemon, &id);
if (!peer) {
daemon_conn_send(daemon->master,
take(towire_gossip_ping_reply(NULL, &id,
take(towire_gossipd_ping_reply(NULL, &id,
false, 0)));
goto out;
}
@ -1203,7 +1203,7 @@ static struct io_plan *ping_req(struct io_conn *conn, struct daemon *daemon,
*/
if (num_pong_bytes >= 65532)
daemon_conn_send(daemon->master,
take(towire_gossip_ping_reply(NULL, &id,
take(towire_gossipd_ping_reply(NULL, &id,
true, 0)));
else
/* We'll respond to lightningd once the pong comes in */
@ -1244,8 +1244,8 @@ static struct io_plan *get_incoming_channels(struct io_conn *conn,
bool *priv_deadends = tal_arr(tmpctx, bool, 0);
bool *pub_deadends = tal_arr(tmpctx, bool, 0);
if (!fromwire_gossip_get_incoming_channels(msg))
master_badmsg(WIRE_GOSSIP_GET_INCOMING_CHANNELS, msg);
if (!fromwire_gossipd_get_incoming_channels(msg))
master_badmsg(WIRE_GOSSIPD_GET_INCOMING_CHANNELS, msg);
node = get_node(daemon->rstate, &daemon->rstate->local_id);
if (node) {
@ -1280,7 +1280,7 @@ static struct io_plan *get_incoming_channels(struct io_conn *conn,
}
}
msg = towire_gossip_get_incoming_channels_reply(NULL,
msg = towire_gossipd_get_incoming_channels_reply(NULL,
public, pub_deadends,
private, priv_deadends);
daemon_conn_send(daemon->master, take(msg));
@ -1292,8 +1292,8 @@ static struct io_plan *new_blockheight(struct io_conn *conn,
struct daemon *daemon,
const u8 *msg)
{
if (!fromwire_gossip_new_blockheight(msg, &daemon->current_blockheight))
master_badmsg(WIRE_GOSSIP_NEW_BLOCKHEIGHT, msg);
if (!fromwire_gossipd_new_blockheight(msg, &daemon->current_blockheight))
master_badmsg(WIRE_GOSSIPD_NEW_BLOCKHEIGHT, msg);
/* Check if we can now send any deferred queries. */
for (size_t i = 0; i < tal_count(daemon->deferred_txouts); i++) {
@ -1306,7 +1306,7 @@ static struct io_plan *new_blockheight(struct io_conn *conn,
/* short_channel_id is deep enough, now ask about it. */
daemon_conn_send(daemon->master,
take(towire_gossip_get_txout(NULL, scid)));
take(towire_gossipd_get_txout(NULL, scid)));
tal_arr_remove(&daemon->deferred_txouts, i);
i--;
@ -1321,8 +1321,8 @@ static struct io_plan *dev_gossip_suppress(struct io_conn *conn,
struct daemon *daemon,
const u8 *msg)
{
if (!fromwire_gossip_dev_suppress(msg))
master_badmsg(WIRE_GOSSIP_DEV_SUPPRESS, msg);
if (!fromwire_gossipd_dev_suppress(msg))
master_badmsg(WIRE_GOSSIPD_DEV_SUPPRESS, msg);
status_unusual("Suppressing all gossip");
dev_suppress_gossip = true;
@ -1343,7 +1343,7 @@ static struct io_plan *dev_gossip_memleak(struct io_conn *conn,
found_leak = dump_memleak(memtable);
daemon_conn_send(daemon->master,
take(towire_gossip_dev_memleak_reply(NULL,
take(towire_gossipd_dev_memleak_reply(NULL,
found_leak)));
return daemon_conn_read_next(conn, daemon->master);
}
@ -1355,7 +1355,7 @@ static struct io_plan *dev_compact_store(struct io_conn *conn,
bool done = gossip_store_compact(daemon->rstate->gs);
daemon_conn_send(daemon->master,
take(towire_gossip_dev_compact_store_reply(NULL,
take(towire_gossipd_dev_compact_store_reply(NULL,
done)));
return daemon_conn_read_next(conn, daemon->master);
}
@ -1366,8 +1366,8 @@ static struct io_plan *dev_gossip_set_time(struct io_conn *conn,
{
u32 time;
if (!fromwire_gossip_dev_set_time(msg, &time))
master_badmsg(WIRE_GOSSIP_DEV_SET_TIME, msg);
if (!fromwire_gossipd_dev_set_time(msg, &time))
master_badmsg(WIRE_GOSSIPD_DEV_SET_TIME, msg);
if (!daemon->rstate->gossip_time)
daemon->rstate->gossip_time = tal(daemon->rstate, struct timeabs);
daemon->rstate->gossip_time->ts.tv_sec = time;
@ -1386,8 +1386,8 @@ static struct io_plan *get_stripped_cupdate(struct io_conn *conn,
struct local_chan *local_chan;
const u8 *stripped_update;
if (!fromwire_gossip_get_stripped_cupdate(msg, &scid))
master_badmsg(WIRE_GOSSIP_GET_STRIPPED_CUPDATE, msg);
if (!fromwire_gossipd_get_stripped_cupdate(msg, &scid))
master_badmsg(WIRE_GOSSIPD_GET_STRIPPED_CUPDATE, msg);
local_chan = local_chan_map_get(&daemon->rstate->local_chan_map, &scid);
if (!local_chan) {
@ -1412,7 +1412,7 @@ static struct io_plan *get_stripped_cupdate(struct io_conn *conn,
stripped_update = NULL;
}
daemon_conn_send(daemon->master,
take(towire_gossip_get_stripped_cupdate_reply(NULL,
take(towire_gossipd_get_stripped_cupdate_reply(NULL,
stripped_update)));
return daemon_conn_read_next(conn, daemon->master);
}
@ -1427,8 +1427,8 @@ static struct io_plan *handle_txout_reply(struct io_conn *conn,
struct amount_sat sat;
bool good;
if (!fromwire_gossip_get_txout_reply(msg, msg, &scid, &sat, &outscript))
master_badmsg(WIRE_GOSSIP_GET_TXOUT_REPLY, msg);
if (!fromwire_gossipd_get_txout_reply(msg, msg, &scid, &sat, &outscript))
master_badmsg(WIRE_GOSSIPD_GET_TXOUT_REPLY, msg);
/* Outscript is NULL if it's not an unspent output */
good = handle_pending_cannouncement(daemon, daemon->rstate,
@ -1509,8 +1509,8 @@ static struct io_plan *handle_payment_failure(struct io_conn *conn,
u8 *error;
u8 *channel_update;
if (!fromwire_gossip_payment_failure(msg, msg, &error))
master_badmsg(WIRE_GOSSIP_PAYMENT_FAILURE, msg);
if (!fromwire_gossipd_payment_failure(msg, msg, &error))
master_badmsg(WIRE_GOSSIPD_PAYMENT_FAILURE, msg);
channel_update = channel_update_from_onion_error(tmpctx, error);
if (channel_update) {
@ -1539,8 +1539,8 @@ static struct io_plan *handle_outpoint_spent(struct io_conn *conn,
struct short_channel_id scid;
struct chan *chan;
struct routing_state *rstate = daemon->rstate;
if (!fromwire_gossip_outpoint_spent(msg, &scid))
master_badmsg(WIRE_GOSSIP_OUTPOINT_SPENT, msg);
if (!fromwire_gossipd_outpoint_spent(msg, &scid))
master_badmsg(WIRE_GOSSIPD_OUTPOINT_SPENT, msg);
chan = get_channel(rstate, &scid);
if (chan) {
@ -1576,8 +1576,8 @@ static struct io_plan *handle_local_channel_close(struct io_conn *conn,
struct short_channel_id scid;
struct chan *chan;
struct routing_state *rstate = daemon->rstate;
if (!fromwire_gossip_local_channel_close(msg, &scid))
master_badmsg(WIRE_GOSSIP_LOCAL_CHANNEL_CLOSE, msg);
if (!fromwire_gossipd_local_channel_close(msg, &scid))
master_badmsg(WIRE_GOSSIPD_LOCAL_CHANNEL_CLOSE, msg);
chan = get_channel(rstate, &scid);
if (chan)
@ -1590,75 +1590,75 @@ static struct io_plan *recv_req(struct io_conn *conn,
const u8 *msg,
struct daemon *daemon)
{
enum gossip_wire_type t = fromwire_peektype(msg);
enum gossipd_wire t = fromwire_peektype(msg);
switch (t) {
case WIRE_GOSSIPCTL_INIT:
case WIRE_GOSSIPD_INIT:
return gossip_init(conn, daemon, msg);
case WIRE_GOSSIP_GETNODES_REQUEST:
case WIRE_GOSSIPD_GETNODES_REQUEST:
return getnodes(conn, daemon, msg);
case WIRE_GOSSIP_GETROUTE_REQUEST:
case WIRE_GOSSIPD_GETROUTE_REQUEST:
return getroute_req(conn, daemon, msg);
case WIRE_GOSSIP_GETCHANNELS_REQUEST:
case WIRE_GOSSIPD_GETCHANNELS_REQUEST:
return getchannels_req(conn, daemon, msg);
case WIRE_GOSSIP_GET_STRIPPED_CUPDATE:
case WIRE_GOSSIPD_GET_STRIPPED_CUPDATE:
return get_stripped_cupdate(conn, daemon, msg);
case WIRE_GOSSIP_GET_TXOUT_REPLY:
case WIRE_GOSSIPD_GET_TXOUT_REPLY:
return handle_txout_reply(conn, daemon, msg);
case WIRE_GOSSIP_PAYMENT_FAILURE:
case WIRE_GOSSIPD_PAYMENT_FAILURE:
return handle_payment_failure(conn, daemon, msg);
case WIRE_GOSSIP_OUTPOINT_SPENT:
case WIRE_GOSSIPD_OUTPOINT_SPENT:
return handle_outpoint_spent(conn, daemon, msg);
case WIRE_GOSSIP_LOCAL_CHANNEL_CLOSE:
case WIRE_GOSSIPD_LOCAL_CHANNEL_CLOSE:
return handle_local_channel_close(conn, daemon, msg);
case WIRE_GOSSIP_PING:
case WIRE_GOSSIPD_PING:
return ping_req(conn, daemon, msg);
case WIRE_GOSSIP_GET_INCOMING_CHANNELS:
case WIRE_GOSSIPD_GET_INCOMING_CHANNELS:
return get_incoming_channels(conn, daemon, msg);
case WIRE_GOSSIP_NEW_BLOCKHEIGHT:
case WIRE_GOSSIPD_NEW_BLOCKHEIGHT:
return new_blockheight(conn, daemon, msg);
#if DEVELOPER
case WIRE_GOSSIP_DEV_SET_MAX_SCIDS_ENCODE_SIZE:
case WIRE_GOSSIPD_DEV_SET_MAX_SCIDS_ENCODE_SIZE:
return dev_set_max_scids_encode_size(conn, daemon, msg);
case WIRE_GOSSIP_DEV_SUPPRESS:
case WIRE_GOSSIPD_DEV_SUPPRESS:
return dev_gossip_suppress(conn, daemon, msg);
case WIRE_GOSSIP_DEV_MEMLEAK:
case WIRE_GOSSIPD_DEV_MEMLEAK:
return dev_gossip_memleak(conn, daemon, msg);
case WIRE_GOSSIP_DEV_COMPACT_STORE:
case WIRE_GOSSIPD_DEV_COMPACT_STORE:
return dev_compact_store(conn, daemon, msg);
case WIRE_GOSSIP_DEV_SET_TIME:
case WIRE_GOSSIPD_DEV_SET_TIME:
return dev_gossip_set_time(conn, daemon, msg);
#else
case WIRE_GOSSIP_DEV_SET_MAX_SCIDS_ENCODE_SIZE:
case WIRE_GOSSIP_DEV_SUPPRESS:
case WIRE_GOSSIP_DEV_MEMLEAK:
case WIRE_GOSSIP_DEV_COMPACT_STORE:
case WIRE_GOSSIP_DEV_SET_TIME:
case WIRE_GOSSIPD_DEV_SET_MAX_SCIDS_ENCODE_SIZE:
case WIRE_GOSSIPD_DEV_SUPPRESS:
case WIRE_GOSSIPD_DEV_MEMLEAK:
case WIRE_GOSSIPD_DEV_COMPACT_STORE:
case WIRE_GOSSIPD_DEV_SET_TIME:
break;
#endif /* !DEVELOPER */
/* We send these, we don't receive them */
case WIRE_GOSSIP_GETNODES_REPLY:
case WIRE_GOSSIP_GETROUTE_REPLY:
case WIRE_GOSSIP_GETCHANNELS_REPLY:
case WIRE_GOSSIP_PING_REPLY:
case WIRE_GOSSIP_GET_STRIPPED_CUPDATE_REPLY:
case WIRE_GOSSIP_GET_INCOMING_CHANNELS_REPLY:
case WIRE_GOSSIP_GET_TXOUT:
case WIRE_GOSSIP_DEV_MEMLEAK_REPLY:
case WIRE_GOSSIP_DEV_COMPACT_STORE_REPLY:
case WIRE_GOSSIPD_GETNODES_REPLY:
case WIRE_GOSSIPD_GETROUTE_REPLY:
case WIRE_GOSSIPD_GETCHANNELS_REPLY:
case WIRE_GOSSIPD_PING_REPLY:
case WIRE_GOSSIPD_GET_STRIPPED_CUPDATE_REPLY:
case WIRE_GOSSIPD_GET_INCOMING_CHANNELS_REPLY:
case WIRE_GOSSIPD_GET_TXOUT:
case WIRE_GOSSIPD_DEV_MEMLEAK_REPLY:
case WIRE_GOSSIPD_DEV_COMPACT_STORE_REPLY:
break;
}

0
gossipd/gossip_peerd_wire.csv → gossipd/gossipd_peerd_wire.csv

Can't render this file because it has a wrong number of fields in line 6.

140
gossipd/gossipd_wire.csv

@ -0,0 +1,140 @@
#include <common/cryptomsg.h>
#include <common/features.h>
#include <common/wireaddr.h>
#include <wire/gen_onion_wire.h>
# Initialize the gossip daemon.
msgtype,gossipd_init,3000
msgdata,gossipd_init,chainparams,chainparams,
msgdata,gossipd_init,our_features,feature_set,
msgdata,gossipd_init,id,node_id,
msgdata,gossipd_init,rgb,u8,3
msgdata,gossipd_init,alias,u8,32
msgdata,gossipd_init,num_announcable,u16,
msgdata,gossipd_init,announcable,wireaddr,num_announcable
msgdata,gossipd_init,dev_gossip_time,?u32,
msgdata,gossipd_init,dev_fast_gossip,bool,
msgdata,gossipd_init,dev_fast_gossip_prune,bool,
# In developer mode, we can mess with time.
msgtype,gossipd_dev_set_time,3001
msgdata,gossipd_dev_set_time,dev_gossip_time,u32,
# Pass JSON-RPC getnodes call through
msgtype,gossipd_getnodes_request,3005
msgdata,gossipd_getnodes_request,id,?node_id,
#include <lightningd/gossip_msg.h>
msgtype,gossipd_getnodes_reply,3105
msgdata,gossipd_getnodes_reply,num_nodes,u32,
msgdata,gossipd_getnodes_reply,nodes,gossip_getnodes_entry,num_nodes
# Pass JSON-RPC getroute call through
msgtype,gossipd_getroute_request,3006
# Source defaults to "us", and means we don't consider first-hop channel fees
msgdata,gossipd_getroute_request,source,?node_id,
msgdata,gossipd_getroute_request,destination,node_id,
msgdata,gossipd_getroute_request,msatoshi,amount_msat,
msgdata,gossipd_getroute_request,riskfactor_millionths,u64,
msgdata,gossipd_getroute_request,final_cltv,u32,
msgdata,gossipd_getroute_request,fuzz_millionths,u64,
msgdata,gossipd_getroute_request,num_excluded,u16,
msgdata,gossipd_getroute_request,excluded,exclude_entry,num_excluded
msgdata,gossipd_getroute_request,max_hops,u32,
msgtype,gossipd_getroute_reply,3106
msgdata,gossipd_getroute_reply,num_hops,u16,
msgdata,gossipd_getroute_reply,hops,route_hop,num_hops
msgtype,gossipd_getchannels_request,3007
msgdata,gossipd_getchannels_request,short_channel_id,?short_channel_id,
msgdata,gossipd_getchannels_request,source,?node_id,
msgdata,gossipd_getchannels_request,prev,?short_channel_id,
msgtype,gossipd_getchannels_reply,3107
msgdata,gossipd_getchannels_reply,complete,bool,
msgdata,gossipd_getchannels_reply,num_channels,u32,
msgdata,gossipd_getchannels_reply,nodes,gossip_getchannels_entry,num_channels
# Ping/pong test. Waits for a reply if it expects one.
msgtype,gossipd_ping,3008
msgdata,gossipd_ping,id,node_id,
msgdata,gossipd_ping,num_pong_bytes,u16,
msgdata,gossipd_ping,len,u16,
msgtype,gossipd_ping_reply,3108
msgdata,gossipd_ping_reply,id,node_id,
# False if id in gossip_ping was unknown.
msgdata,gossipd_ping_reply,sent,bool,
# 0 == no pong expected
msgdata,gossipd_ping_reply,totlen,u16,
# Set artificial maximum reply_channel_range size. Master->gossipd
msgtype,gossipd_dev_set_max_scids_encode_size,3030
msgdata,gossipd_dev_set_max_scids_encode_size,max,u32,
# Given a short_channel_id, return the latest (stripped) update for error msg.
msgtype,gossipd_get_stripped_cupdate,3010
msgdata,gossipd_get_stripped_cupdate,channel_id,short_channel_id,
msgtype,gossipd_get_stripped_cupdate_reply,3110
msgdata,gossipd_get_stripped_cupdate_reply,stripped_update_len,u16,
msgdata,gossipd_get_stripped_cupdate_reply,stripped_update,u8,stripped_update_len
# gossipd->master: we're closing this channel.
msgtype,gossipd_local_channel_close,3027
msgdata,gossipd_local_channel_close,short_channel_id,short_channel_id,
# Gossipd->master get this tx output please.
msgtype,gossipd_get_txout,3018
msgdata,gossipd_get_txout,short_channel_id,short_channel_id,
# master->gossipd here is the output, or empty if none.
msgtype,gossipd_get_txout_reply,3118
msgdata,gossipd_get_txout_reply,short_channel_id,short_channel_id,
msgdata,gossipd_get_txout_reply,satoshis,amount_sat,
msgdata,gossipd_get_txout_reply,len,u16,
msgdata,gossipd_get_txout_reply,outscript,u8,len
# master->gossipd an htlc failed with this onion error.
msgtype,gossipd_payment_failure,3021
msgdata,gossipd_payment_failure,len,u16,
msgdata,gossipd_payment_failure,error,u8,len
# master -> gossipd: a potential funding outpoint was spent, please forget the eventual channel
msgtype,gossipd_outpoint_spent,3024
msgdata,gossipd_outpoint_spent,short_channel_id,short_channel_id,
# master -> gossipd: stop gossip timers.
msgtype,gossipd_dev_suppress,3032
# master -> gossipd: do you have a memleak?
msgtype,gossipd_dev_memleak,3033
msgtype,gossipd_dev_memleak_reply,3133
msgdata,gossipd_dev_memleak_reply,leak,bool,
# master -> gossipd: please rewrite the gossip_store
msgtype,gossipd_dev_compact_store,3034
# gossipd -> master: ok
msgtype,gossipd_dev_compact_store_reply,3134
msgdata,gossipd_dev_compact_store_reply,success,bool,
#include <common/bolt11.h>
# master -> gossipd: get route_info for our incoming channels
msgtype,gossipd_get_incoming_channels,3025
# gossipd -> master: here they are.
msgtype,gossipd_get_incoming_channels_reply,3125
msgdata,gossipd_get_incoming_channels_reply,num_public,u16,
msgdata,gossipd_get_incoming_channels_reply,public_route_info,route_info,num_public
msgdata,gossipd_get_incoming_channels_reply,public_deadends,bool,num_public
msgdata,gossipd_get_incoming_channels_reply,num_private,u16,
msgdata,gossipd_get_incoming_channels_reply,private_route_info,route_info,num_private
msgdata,gossipd_get_incoming_channels_reply,private_deadends,bool,num_private
# master -> gossipd: blockheight increased.
msgtype,gossipd_new_blockheight,3026
msgdata,gossipd_new_blockheight,blockheight,u32,
Can't render this file because it has a wrong number of fields in line 7.

6
gossipd/queries.c

@ -9,9 +9,9 @@
#include <common/status.h>
#include <common/type_to_string.h>
#include <common/wire_error.h>
#include <gossipd/gen_gossip_wire.h>
#include <gossipd/gossip_generation.h>
#include <gossipd/gossipd.h>
#include <gossipd/gossipd_wiregen.h>
#include <gossipd/queries.h>
#include <gossipd/routing.h>
#include <gossipd/seeker.h>
@ -1072,9 +1072,9 @@ struct io_plan *dev_set_max_scids_encode_size(struct io_conn *conn,
struct daemon *daemon,
const u8 *msg)
{
if (!fromwire_gossip_dev_set_max_scids_encode_size(msg,
if (!fromwire_gossipd_dev_set_max_scids_encode_size(msg,
&max_encoding_bytes))
master_badmsg(WIRE_GOSSIP_DEV_SET_MAX_SCIDS_ENCODE_SIZE, msg);
master_badmsg(WIRE_GOSSIPD_DEV_SET_MAX_SCIDS_ENCODE_SIZE, msg);
status_debug("Set max_scids_encode_bytes to %u", max_encoding_bytes);
return daemon_conn_read_next(conn, daemon->master);

6
gossipd/routing.c

@ -15,11 +15,11 @@
#include <common/type_to_string.h>
#include <common/wire_error.h>
#include <common/wireaddr.h>
#include <gossipd/gen_gossip_peerd_wire.h>
#include <gossipd/gen_gossip_store.h>
#include <gossipd/gen_gossip_wire.h>
#include <gossipd/gossip_generation.h>
#include <gossipd/gossip_store_wiregen.h>
#include <gossipd/gossipd.h>
#include <gossipd/gossipd_peerd_wiregen.h>
#include <gossipd/gossipd_wiregen.h>
#include <inttypes.h>
#include <wire/gen_peer_wire.h>

6
gossipd/test/run-crc32_of_update.c

@ -31,9 +31,9 @@ struct peer *find_peer(struct daemon *daemon UNNEEDED, const struct node_id *id
/* Generated stub for fmt_wireaddr_without_port */
char *fmt_wireaddr_without_port(const tal_t *ctx UNNEEDED, const struct wireaddr *a UNNEEDED)
{ fprintf(stderr, "fmt_wireaddr_without_port called!\n"); abort(); }
/* Generated stub for fromwire_gossip_dev_set_max_scids_encode_size */
bool fromwire_gossip_dev_set_max_scids_encode_size(const void *p UNNEEDED, u32 *max UNNEEDED)
{ fprintf(stderr, "fromwire_gossip_dev_set_max_scids_encode_size called!\n"); abort(); }
/* Generated stub for fromwire_gossipd_dev_set_max_scids_encode_size */
bool fromwire_gossipd_dev_set_max_scids_encode_size(const void *p UNNEEDED, u32 *max UNNEEDED)
{ fprintf(stderr, "fromwire_gossipd_dev_set_max_scids_encode_size called!\n"); abort(); }
/* Generated stub for fromwire_gossipd_local_channel_update */
bool fromwire_gossipd_local_channel_update(const void *p UNNEEDED, struct short_channel_id *short_channel_id UNNEEDED, bool *disable UNNEEDED, u16 *cltv_expiry_delta UNNEEDED, struct amount_msat *htlc_minimum_msat UNNEEDED, u32 *fee_base_msat UNNEEDED, u32 *fee_proportional_millionths UNNEEDED, struct amount_msat *htlc_maximum_msat UNNEEDED)
{ fprintf(stderr, "fromwire_gossipd_local_channel_update called!\n"); abort(); }

6
gossipd/test/run-extended-info.c

@ -36,9 +36,9 @@ struct short_channel_id *decode_short_ids(const tal_t *ctx UNNEEDED, const u8 *e
/* Generated stub for fmt_wireaddr_without_port */
char *fmt_wireaddr_without_port(const tal_t *ctx UNNEEDED, const struct wireaddr *a UNNEEDED)
{ fprintf(stderr, "fmt_wireaddr_without_port called!\n"); abort(); }
/* Generated stub for fromwire_gossip_dev_set_max_scids_encode_size */
bool fromwire_gossip_dev_set_max_scids_encode_size(const void *p UNNEEDED, u32 *max UNNEEDED)
{ fprintf(stderr, "fromwire_gossip_dev_set_max_scids_encode_size called!\n"); abort(); }
/* Generated stub for fromwire_gossipd_dev_set_max_scids_encode_size */
bool fromwire_gossipd_dev_set_max_scids_encode_size(const void *p UNNEEDED, u32 *max UNNEEDED)
{ fprintf(stderr, "fromwire_gossipd_dev_set_max_scids_encode_size called!\n"); abort(); }
/* Generated stub for get_cupdate_parts */
void get_cupdate_parts(const u8 *channel_update UNNEEDED,
const u8 *parts[2] UNNEEDED,

4
lightningd/closing_control.c

@ -7,7 +7,7 @@
#include <common/per_peer_state.h>
#include <common/utils.h>
#include <errno.h>
#include <gossipd/gen_gossip_wire.h>
#include <gossipd/gossipd_wiregen.h>
#include <inttypes.h>
#include <lightningd/bitcoind.h>
#include <lightningd/chaintopology.h>
@ -311,6 +311,6 @@ void peer_start_closingd(struct channel *channel,
* be used. */
if (channel->scid)
subd_send_msg(channel->peer->ld->gossip,
take(towire_gossip_local_channel_close(
take(towire_gossipd_local_channel_close(
tmpctx, channel->scid)));
}

96
lightningd/gossip_control.c

@ -20,7 +20,7 @@
#include <common/type_to_string.h>
#include <common/utils.h>
#include <errno.h>
#include <gossipd/gen_gossip_wire.h>
#include <gossipd/gossipd_wiregen.h>
#include <hsmd/capabilities.h>
#include <inttypes.h>
#include <lightningd/connect_control.h>
@ -54,7 +54,7 @@ static void got_txout(struct bitcoind *bitcoind,
subd_send_msg(
bitcoind->ld->gossip,
towire_gossip_get_txout_reply(scid, scid, sat, script));
towire_gossipd_get_txout_reply(scid, scid, sat, script));
tal_free(scid);
}
@ -99,7 +99,7 @@ static void get_txout(struct subd *gossip, const u8 *msg)
u32 blockheight;
struct chain_topology *topo = gossip->ld->topology;
if (!fromwire_gossip_get_txout(msg, scid))
if (!fromwire_gossipd_get_txout(msg, scid))
fatal("Gossip gave bad GOSSIP_GET_TXOUT message %s",
tal_hex(msg, msg));
@ -110,7 +110,7 @@ static void get_txout(struct subd *gossip, const u8 *msg)
if (op) {
subd_send_msg(gossip,
towire_gossip_get_txout_reply(
towire_gossipd_get_txout_reply(
scid, scid, op->sat, op->scriptpubkey));
tal_free(scid);
} else if (wallet_have_block(gossip->ld->wallet, blockheight)) {
@ -118,7 +118,7 @@ static void get_txout(struct subd *gossip, const u8 *msg)
* is in the DB. The fact that we don't means that this is
* either a spent outpoint or an invalid one. Return a
* failure. */
subd_send_msg(gossip, take(towire_gossip_get_txout_reply(
subd_send_msg(gossip, take(towire_gossipd_get_txout_reply(
NULL, scid, AMOUNT_SAT(0), NULL)));
tal_free(scid);
} else {
@ -128,42 +128,42 @@ static void get_txout(struct subd *gossip, const u8 *msg)
static unsigned gossip_msg(struct subd *gossip, const u8 *msg, const int *fds)
{
enum gossip_wire_type t = fromwire_peektype(msg);
enum gossipd_wire t = fromwire_peektype(msg);
switch (t) {
/* These are messages we send, not them. */
case WIRE_GOSSIPCTL_INIT:
case WIRE_GOSSIP_GETNODES_REQUEST:
case WIRE_GOSSIP_GETROUTE_REQUEST:
case WIRE_GOSSIP_GETCHANNELS_REQUEST:
case WIRE_GOSSIP_PING:
case WIRE_GOSSIP_GET_STRIPPED_CUPDATE:
case WIRE_GOSSIP_GET_TXOUT_REPLY:
case WIRE_GOSSIP_OUTPOINT_SPENT:
case WIRE_GOSSIP_PAYMENT_FAILURE:
case WIRE_GOSSIP_GET_INCOMING_CHANNELS:
case WIRE_GOSSIP_DEV_SET_MAX_SCIDS_ENCODE_SIZE:
case WIRE_GOSSIP_DEV_SUPPRESS:
case WIRE_GOSSIP_LOCAL_CHANNEL_CLOSE:
case WIRE_GOSSIP_DEV_MEMLEAK:
case WIRE_GOSSIP_DEV_COMPACT_STORE:
case WIRE_GOSSIP_DEV_SET_TIME:
case WIRE_GOSSIP_NEW_BLOCKHEIGHT:
case WIRE_GOSSIPD_INIT:
case WIRE_GOSSIPD_GETNODES_REQUEST:
case WIRE_GOSSIPD_GETROUTE_REQUEST:
case WIRE_GOSSIPD_GETCHANNELS_REQUEST:
case WIRE_GOSSIPD_PING:
case WIRE_GOSSIPD_GET_STRIPPED_CUPDATE:
case WIRE_GOSSIPD_GET_TXOUT_REPLY:
case WIRE_GOSSIPD_OUTPOINT_SPENT:
case WIRE_GOSSIPD_PAYMENT_FAILURE:
case WIRE_GOSSIPD_GET_INCOMING_CHANNELS:
case WIRE_GOSSIPD_DEV_SET_MAX_SCIDS_ENCODE_SIZE:
case WIRE_GOSSIPD_DEV_SUPPRESS:
case WIRE_GOSSIPD_LOCAL_CHANNEL_CLOSE:
case WIRE_GOSSIPD_DEV_MEMLEAK:
case WIRE_GOSSIPD_DEV_COMPACT_STORE:
case WIRE_GOSSIPD_DEV_SET_TIME:
case WIRE_GOSSIPD_NEW_BLOCKHEIGHT:
/* This is a reply, so never gets through to here. */
case WIRE_GOSSIP_GETNODES_REPLY:
case WIRE_GOSSIP_GETROUTE_REPLY:
case WIRE_GOSSIP_GETCHANNELS_REPLY:
case WIRE_GOSSIP_GET_INCOMING_CHANNELS_REPLY:
case WIRE_GOSSIP_DEV_MEMLEAK_REPLY:
case WIRE_GOSSIP_DEV_COMPACT_STORE_REPLY:
case WIRE_GOSSIP_GET_STRIPPED_CUPDATE_REPLY:
case WIRE_GOSSIPD_GETNODES_REPLY:
case WIRE_GOSSIPD_GETROUTE_REPLY:
case WIRE_GOSSIPD_GETCHANNELS_REPLY:
case WIRE_GOSSIPD_GET_INCOMING_CHANNELS_REPLY:
case WIRE_GOSSIPD_DEV_MEMLEAK_REPLY:
case WIRE_GOSSIPD_DEV_COMPACT_STORE_REPLY:
case WIRE_GOSSIPD_GET_STRIPPED_CUPDATE_REPLY:
break;
case WIRE_GOSSIP_PING_REPLY:
case WIRE_GOSSIPD_PING_REPLY:
ping_reply(gossip, msg);
break;
case WIRE_GOSSIP_GET_TXOUT:
case WIRE_GOSSIPD_GET_TXOUT:
get_txout(gossip, msg);
break;
}
@ -177,7 +177,7 @@ void gossip_notify_new_block(struct lightningd *ld, u32 blockheight)
return;
subd_send_msg(ld->gossip,
take(towire_gossip_new_blockheight(NULL, blockheight)));
take(towire_gossipd_new_blockheight(NULL, blockheight)));
}
static void gossip_topology_synced(struct chain_topology *topo, void *unused)
@ -196,7 +196,7 @@ void gossip_init(struct lightningd *ld, int connectd_fd)
hsmfd = hsm_get_global_fd(ld, HSM_CAP_SIGN_GOSSIP);
ld->gossip = new_global_subd(ld, "lightning_gossipd",
gossip_wire_type_name, gossip_msg,
gossipd_wire_name, gossip_msg,
take(&hsmfd), take(&connectd_fd), NULL);
if (!ld->gossip)
err(1, "Could not subdaemon gossip");
@ -205,7 +205,7 @@ void gossip_init(struct lightningd *ld, int connectd_fd)
topology_add_sync_waiter(ld->gossip, ld->topology,
gossip_topology_synced, NULL);
msg = towire_gossipctl_init(
msg = towire_gossipd_init(
tmpctx,
chainparams,
ld->our_features,
@ -222,7 +222,7 @@ void gossip_init(struct lightningd *ld, int connectd_fd)
void gossipd_notify_spend(struct lightningd *ld,
const struct short_channel_id *scid)
{
u8 *msg = towire_gossip_outpoint_spent(tmpctx, scid);
u8 *msg = towire_gossipd_outpoint_spent(tmpctx, scid);
subd_send_msg(ld->gossip, msg);
}
@ -234,7 +234,7 @@ static void json_getnodes_reply(struct subd *gossip UNUSED, const u8 *reply,
struct json_stream *response;
size_t i, j;
if (!fromwire_gossip_getnodes_reply(reply, reply, &nodes)) {
if (!fromwire_gossipd_getnodes_reply(reply, reply, &nodes)) {
was_pending(command_fail(cmd, LIGHTNINGD,
"Malformed gossip_getnodes response"));
return;
@ -286,7 +286,7 @@ static struct command_result *json_listnodes(struct command *cmd,
NULL))
return command_param_failed();
req = towire_gossip_getnodes_request(cmd, id);
req = towire_gossipd_getnodes_request(cmd, id);
subd_req(cmd, cmd->ld->gossip, req, -1, 0, json_getnodes_reply, cmd);
return command_still_pending(cmd);
}
@ -348,7 +348,7 @@ static void json_getroute_reply(struct subd *gossip UNUSED, const u8 *reply, con
struct json_stream *response;
struct route_hop **hops;
fromwire_gossip_getroute_reply(reply, reply, &hops);
fromwire_gossipd_getroute_reply(reply, reply, &hops);
if (tal_count(hops) == 0) {
was_pending(command_fail(cmd, PAY_ROUTE_NOT_FOUND,
@ -434,7 +434,7 @@ static struct command_result *json_getroute(struct command *cmd,
excluded = NULL;
}
u8 *req = towire_gossip_getroute_request(
u8 *req = towire_gossipd_getroute_request(
cmd, source, destination, *msat, *riskfactor_millionths, *cltv,
*fuzz_millionths, excluded, *max_hops);
subd_req(ld->gossip, ld->gossip, req, -1, 0, json_getroute_reply, cmd);
@ -501,7 +501,7 @@ static void json_listchannels_reply(struct subd *gossip UNUSED, const u8 *reply,
struct gossip_getchannels_entry **entries;
bool complete;
if (!fromwire_gossip_getchannels_reply(reply, reply,
if (!fromwire_gossipd_getchannels_reply(reply, reply,
&complete, &entries)) {
/* Shouldn't happen: just end json stream. */
log_broken(linfo->cmd->ld->log, "Invalid reply from gossipd");
@ -518,7 +518,7 @@ static void json_listchannels_reply(struct subd *gossip UNUSED, const u8 *reply,
if (!complete) {
u8 *req;
assert(tal_count(entries) != 0);
req = towire_gossip_getchannels_request(linfo->cmd,
req = towire_gossipd_getchannels_request(linfo->cmd,
linfo->id,
linfo->source,
&entries[i-1]
@ -554,7 +554,7 @@ static struct command_result *json_listchannels(struct command *cmd,
linfo->response = json_stream_success(cmd);
json_array_start(linfo->response, "channels");
req = towire_gossip_getchannels_request(cmd, linfo->id, linfo->source,
req = towire_gossipd_getchannels_request(cmd, linfo->id, linfo->source,
NULL);
subd_req(cmd->ld->gossip, cmd->ld->gossip,
req, -1, 0, json_listchannels_reply, linfo);
@ -585,7 +585,7 @@ json_dev_set_max_scids_encode_size(struct command *cmd,
NULL))
return command_param_failed();
msg = towire_gossip_dev_set_max_scids_encode_size(NULL, *max);
msg = towire_gossipd_dev_set_max_scids_encode_size(NULL, *max);
subd_send_msg(cmd->ld->gossip, take(msg));
return command_success(cmd, json_stream_success(cmd));
@ -607,7 +607,7 @@ static struct command_result *json_dev_suppress_gossip(struct command *cmd,
if (!param(cmd, buffer, params, NULL))
return command_param_failed();
subd_send_msg(cmd->ld->gossip, take(towire_gossip_dev_suppress(NULL)));
subd_send_msg(cmd->ld->gossip, take(towire_gossipd_dev_suppress(NULL)));
return command_success(cmd, json_stream_success(cmd));
}
@ -627,7 +627,7 @@ static void dev_compact_gossip_store_reply(struct subd *gossip UNUSED,
{
bool success;
if (!fromwire_gossip_dev_compact_store_reply(reply, &success)) {
if (!fromwire_gossipd_dev_compact_store_reply(reply, &success)) {
was_pending(command_fail(cmd, LIGHTNINGD,
"Gossip gave bad dev_gossip_compact_store_reply"));
return;
@ -649,7 +649,7 @@ static struct command_result *json_dev_compact_gossip_store(struct command *cmd,
if (!param(cmd, buffer, params, NULL))
return command_param_failed();
msg = towire_gossip_dev_compact_store(NULL);
msg = towire_gossipd_dev_compact_store(NULL);
subd_req(cmd->ld->gossip, cmd->ld->gossip,
take(msg), -1, 0, dev_compact_gossip_store_reply, cmd);
return command_still_pending(cmd);
@ -676,7 +676,7 @@ static struct command_result *json_dev_gossip_set_time(struct command *cmd,
NULL))
return command_param_failed();
msg = towire_gossip_dev_set_time(NULL, *time);
msg = towire_gossipd_dev_set_time(NULL, *time);
subd_send_msg(cmd->ld->gossip, take(msg));
return command_success(cmd, json_stream_success(cmd));

6
lightningd/invoice.c

@ -20,7 +20,7 @@
#include <common/timeout.h>
#include <common/utils.h>
#include <errno.h>
#include <gossipd/gen_gossip_wire.h>
#include <gossipd/gossipd_wiregen.h>
#include <hsmd/hsmd_wiregen.h>
#include <inttypes.h>
#include <lightningd/channel.h>
@ -635,7 +635,7 @@ static void gossipd_incoming_channels_reply(struct subd *gossipd,
struct wallet *wallet = info->cmd->ld->wallet;
const struct chanhints *chanhints = info->chanhints;
if (!fromwire_gossip_get_incoming_channels_reply(tmpctx, msg,
if (!fromwire_gossipd_get_incoming_channels_reply(tmpctx, msg,
&inchans,
&inchan_deadends,
&private,
@ -1056,7 +1056,7 @@ static struct command_result *json_invoice(struct command *cmd,
info->b11->fallbacks = tal_steal(info->b11, fallback_scripts);
subd_req(cmd, cmd->ld->gossip,
take(towire_gossip_get_incoming_channels(NULL)),
take(towire_gossipd_get_incoming_channels(NULL)),
-1, 0, gossipd_incoming_channels_reply, info);
return command_still_pending(cmd);

6
lightningd/memdump.c

@ -12,7 +12,7 @@
#include <common/timeout.h>
#include <connectd/gen_connect_wire.h>
#include <errno.h>
#include <gossipd/gen_gossip_wire.h>
#include <gossipd/gossipd_wiregen.h>
#include <hsmd/hsmd_wiregen.h>
#include <lightningd/chaintopology.h>
#include <lightningd/jsonrpc.h>
@ -227,7 +227,7 @@ static void gossip_dev_memleak_done(struct subd *gossipd,
{
bool found_leak;
if (!fromwire_gossip_dev_memleak_reply(reply, &found_leak)) {
if (!fromwire_gossipd_dev_memleak_reply(reply, &found_leak)) {
was_pending(command_fail(cmd, LIGHTNINGD,
"Bad gossip_dev_memleak"));
return;
@ -277,7 +277,7 @@ static void hsm_dev_memleak_done(struct subd *hsmd,
}
/* No leak? Ask gossipd. */
subd_req(ld->gossip, ld->gossip, take(towire_gossip_dev_memleak(NULL)),
subd_req(ld->gossip, ld->gossip, take(towire_gossipd_dev_memleak(NULL)),
-1, 0, gossip_dev_memleak_done, cmd);
}

4
lightningd/pay.c

@ -9,7 +9,7 @@
#include <common/onionreply.h>
#include <common/param.h>
#include <common/timeout.h>
#include <gossipd/gen_gossip_wire.h>
#include <gossipd/gossipd_wiregen.h>
#include <lightningd/chaintopology.h>
#include <lightningd/json.h>
#include <lightningd/jsonrpc.h>
@ -459,7 +459,7 @@ remote_routing_failure(const tal_t *ctx,
/* FIXME: sendonion caller should do this, and inform gossipd of any
* permanent errors. */
subd_send_msg(ld->gossip,
take(towire_gossip_payment_failure(NULL, failuremsg)));
take(towire_gossipd_payment_failure(NULL, failuremsg)));
routing_failure->erring_index = (unsigned int) (origin_index + 1);
routing_failure->failcode = failcode;

6
lightningd/peer_htlcs.c

@ -19,7 +19,7 @@
#include <common/sphinx.h>
#include <common/timeout.h>
#include <common/utils.h>
#include <gossipd/gen_gossip_wire.h>
#include <gossipd/gossipd_wiregen.h>
#include <lightningd/chaintopology.h>
#include <lightningd/coin_mvts.h>
#include <lightningd/htlc_end.h>
@ -164,7 +164,7 @@ static void failmsg_update_reply(struct subd *gossipd,
struct failed_htlc *failed_htlc;
/* This can happen because channel never got properly announced.*/
if (!fromwire_gossip_get_stripped_cupdate_reply(msg, msg,
if (!fromwire_gossipd_get_stripped_cupdate_reply(msg, msg,
&stripped_update)
|| !tal_count(stripped_update)) {
failmsg = towire_temporary_node_failure(NULL);
@ -277,7 +277,7 @@ void local_fail_in_htlc_needs_update(struct htlc_in *hin,
cbdata->failmsg_needs_update
= tal_dup_talarr(cbdata, u8, failmsg_needs_update);
subd_req(cbdata, hin->key.channel->peer->ld->gossip,
take(towire_gossip_get_stripped_cupdate(NULL, failmsg_scid)),
take(towire_gossipd_get_stripped_cupdate(NULL, failmsg_scid)),
-1, 0, failmsg_update_reply, cbdata);
}

6
lightningd/ping.c

@ -4,7 +4,7 @@
#include <common/param.h>
#include <common/sphinx.h>
#include <common/utils.h>
#include <gossipd/gen_gossip_wire.h>
#include <gossipd/gossipd_wiregen.h>
#include <lightningd/htlc_end.h>
#include <lightningd/json.h>
#include <lightningd/jsonrpc.h>
@ -60,7 +60,7 @@ void ping_reply(struct subd *subd, const u8 *msg)
struct ping_command *pc;
log_debug(subd->ld->log, "Got ping reply!");
ok = fromwire_gossip_ping_reply(msg, &id, &sent, &totlen);
ok = fromwire_gossipd_ping_reply(msg, &id, &sent, &totlen);
pc = find_ping_cmd(subd->ld, &id);
assert(pc);
@ -123,7 +123,7 @@ static struct command_result *json_ping(struct command *cmd,
new_ping_command(cmd, cmd->ld, id, cmd);
/* gossipd handles all pinging, even if it's in another daemon. */
msg = towire_gossip_ping(NULL, id, *pongbytes, *len);
msg = towire_gossipd_ping(NULL, id, *pongbytes, *len);
subd_send_msg(cmd->ld->gossip, take(msg));
return command_still_pending(cmd);
}

6
lightningd/signmessage.c

@ -7,7 +7,7 @@
#include <common/type_to_string.h>
#include <common/utils.h>
#include <errno.h>
#include <gossipd/gen_gossip_wire.h>
#include <gossipd/gossipd_wiregen.h>
#include <hsmd/hsmd_wiregen.h>
#include <lightningd/jsonrpc.h>
#include <lightningd/lightningd.h>
@ -137,7 +137,7 @@ static void getnode_reply(struct subd *gossip UNUSED, const u8 *reply,
struct gossip_getnodes_entry **nodes;
struct json_stream *response;
if (!fromwire_gossip_getnodes_reply(reply, reply, &nodes)) {
if (!fromwire_gossipd_getnodes_reply(reply, reply, &nodes)) {
log_broken(can->cmd->ld->log,
"Malformed gossip_getnodes response %s",
tal_hex(tmpctx, reply));
@ -212,7 +212,7 @@ static struct command_result *json_checkmessage(struct command *cmd,
node_id_from_pubkey(&can->id, &reckey);
can->cmd = cmd;
req = towire_gossip_getnodes_request(cmd, &can->id);
req = towire_gossipd_getnodes_request(cmd, &can->id);
subd_req(cmd, cmd->ld->gossip, req, -1, 0, getnode_reply, can);
return command_still_pending(cmd);
}

12
lightningd/test/run-invoice-select-inchan.c

@ -116,9 +116,9 @@ bool fromwire_channeld_dev_memleak_reply(const void *p UNNEEDED, bool *leak UNNE
/* Generated stub for fromwire_connect_peer_connected */
bool fromwire_connect_peer_connected(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, struct node_id *id UNNEEDED, struct wireaddr_internal *addr UNNEEDED, struct per_peer_state **pps UNNEEDED, u8 **features UNNEEDED)
{ fprintf(stderr, "fromwire_connect_peer_connected called!\n"); abort(); }
/* Generated stub for fromwire_gossip_get_incoming_channels_reply */
bool fromwire_gossip_get_incoming_channels_reply(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, struct route_info **public_route_info UNNEEDED, bool **public_deadends UNNEEDED, struct route_info **private_route_info UNNEEDED, bool **private_deadends UNNEEDED)
{ fprintf(stderr, "fromwire_gossip_get_incoming_channels_reply called!\n"); abort(); }
/* Generated stub for fromwire_gossipd_get_incoming_channels_reply */
bool fromwire_gossipd_get_incoming_channels_reply(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, struct route_info **public_route_info UNNEEDED, bool **public_deadends UNNEEDED, struct route_info **private_route_info UNNEEDED, bool **private_deadends UNNEEDED)
{ fprintf(stderr, "fromwire_gossipd_get_incoming_channels_reply called!\n"); abort(); }
/* Generated stub for fromwire_hsmd_get_channel_basepoints_reply */
bool fromwire_hsmd_get_channel_basepoints_reply(const void *p UNNEEDED, struct basepoints *basepoints UNNEEDED, struct pubkey *funding_pubkey UNNEEDED)
{ fprintf(stderr, "fromwire_hsmd_get_channel_basepoints_reply called!\n"); abort(); }
@ -487,9 +487,9 @@ u8 *towire_errorfmt(const tal_t *ctx UNNEEDED,
const struct channel_id *channel UNNEEDED,
const char *fmt UNNEEDED, ...)
{ fprintf(stderr, "towire_errorfmt called!\n"); abort(); }
/* Generated stub for towire_gossip_get_incoming_channels */
u8 *towire_gossip_get_incoming_channels(const tal_t *ctx UNNEEDED)
{ fprintf(stderr, "towire_gossip_get_incoming_channels called!\n"); abort(); }
/* Generated stub for towire_gossipd_get_incoming_channels */
u8 *towire_gossipd_get_incoming_channels(const tal_t *ctx UNNEEDED)
{ fprintf(stderr, "towire_gossipd_get_incoming_channels called!\n"); abort(); }
/* Generated stub for towire_hsmd_get_channel_basepoints */
u8 *towire_hsmd_get_channel_basepoints(const tal_t *ctx UNNEEDED, const struct node_id *peerid UNNEEDED, u64 dbid UNNEEDED)
{ fprintf(stderr, "towire_hsmd_get_channel_basepoints called!\n"); abort(); }

2
openingd/Makefile

@ -82,7 +82,7 @@ OPENINGD_COMMON_OBJS := \
common/version.o \
common/wire_error.o \
common/wireaddr.o \
gossipd/gen_gossip_peerd_wire.o \
gossipd/gossipd_peerd_wiregen.o \
lightningd/gossip_msg.o
$(LIGHTNINGD_OPENING_OBJS): $(LIGHTNINGD_HEADERS)

2
openingd/openingd.c

@ -41,7 +41,7 @@
#include <common/version.h>
#include <common/wire_error.h>
#include <errno.h>
#include <gossipd/gen_gossip_peerd_wire.h>
#include <gossipd/gossipd_peerd_wiregen.h>
#include <hsmd/hsmd_wiregen.h>
#include <inttypes.h>
#include <openingd/gen_opening_wire.h>

12
wallet/test/run-wallet.c

@ -132,9 +132,9 @@ bool fromwire_connect_peer_connected(const tal_t *ctx UNNEEDED, const void *p UN
/* Generated stub for fromwire_custommsg_in */
bool fromwire_custommsg_in(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, u8 **msg UNNEEDED)
{ fprintf(stderr, "fromwire_custommsg_in called!\n"); abort(); }
/* Generated stub for fromwire_gossip_get_stripped_cupdate_reply */
bool fromwire_gossip_get_stripped_cupdate_reply(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, u8 **stripped_update UNNEEDED)
{ fprintf(stderr, "fromwire_gossip_get_stripped_cupdate_reply called!\n"); abort(); }
/* Generated stub for fromwire_gossipd_get_stripped_cupdate_reply */
bool fromwire_gossipd_get_stripped_cupdate_reply(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, u8 **stripped_update UNNEEDED)
{ fprintf(stderr, "fromwire_gossipd_get_stripped_cupdate_reply called!\n"); abort(); }
/* Generated stub for fromwire_hsmd_get_output_scriptpubkey_reply */
bool fromwire_hsmd_get_output_scriptpubkey_reply(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, u8 **script UNNEEDED)
{ fprintf(stderr, "fromwire_hsmd_get_output_scriptpubkey_reply called!\n"); abort(); }
@ -693,9 +693,9 @@ u8 *towire_final_incorrect_cltv_expiry(const tal_t *ctx UNNEEDED, u32 cltv_expir
/* Generated stub for towire_final_incorrect_htlc_amount */
u8 *towire_final_incorrect_htlc_amount(const tal_t *ctx UNNEEDED, struct amount_msat incoming_htlc_amt UNNEEDED)
{ fprintf(stderr, "towire_final_incorrect_htlc_amount called!\n"); abort(); }
/* Generated stub for towire_gossip_get_stripped_cupdate */
u8 *towire_gossip_get_stripped_cupdate(const tal_t *ctx UNNEEDED, const struct short_channel_id *channel_id UNNEEDED)
{ fprintf(stderr, "towire_gossip_get_stripped_cupdate called!\n"); abort(); }
/* Generated stub for towire_gossipd_get_stripped_cupdate */
u8 *towire_gossipd_get_stripped_cupdate(const tal_t *ctx UNNEEDED, const struct short_channel_id *channel_id UNNEEDED)
{ fprintf(stderr, "towire_gossipd_get_stripped_cupdate called!\n"); abort(); }
/* Generated stub for towire_hsmd_get_output_scriptpubkey */
u8 *towire_hsmd_get_output_scriptpubkey(const tal_t *ctx UNNEEDED, u64 channel_id UNNEEDED, const struct node_id *peer_id UNNEEDED, const struct pubkey *commitment_point UNNEEDED)
{ fprintf(stderr, "towire_hsmd_get_output_scriptpubkey called!\n"); abort(); }

Loading…
Cancel
Save