Makefile: create generic wiregen rules, use for channeld.

This means some files get renamed, and I took the opportunity to clarify
our naming (the *d* is important!)

1. channeld/channel_wire.csv -> channeld/channeld_wire.csv
2. channeld/gen_channel_wire.h -> channeld/channeld_wiregen.h
3. enum channel_wire_type -> enum channeld_wire
4. WIRE_CHANNEL_FUNDING_DEPTH -> WIRE_CHANNELD_FUNDING_DEPTH.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2020-08-25 11:03:16 +09:30
parent 7804d89ef1
commit 8ae6740bb1
13 changed files with 434 additions and 439 deletions

View File

@ -247,6 +247,13 @@ config.vars:
%.o: %.c %.o: %.c
@$(call VERBOSE, "cc $<", $(CC) $(CFLAGS) -c -o $@ $<) @$(call VERBOSE, "cc $<", $(CC) $(CFLAGS) -c -o $@ $<)
# generate-wire.py --page [header|impl] hdrfilename wirename < csv > file
%_wiregen.h: %_wire.csv
@if $(CHANGED_FROM_GIT); then $(call VERBOSE,"wiregen $@",tools/generate-wire.py --page header $($@_args) $@ `basename $< .csv` < $< > $@); fi
%_wiregen.c: %_wire.csv
@if $(CHANGED_FROM_GIT); then $(call VERBOSE,"wiregen $@",tools/generate-wire.py --page impl $($@_args) ${@:.c=.h} `basename $< .csv` < $< > $@); fi
include external/Makefile include external/Makefile
include bitcoin/Makefile include bitcoin/Makefile
include common/Makefile include common/Makefile

View File

@ -10,7 +10,7 @@ channeld-all: lightningd/lightning_channeld
LIGHTNINGD_CHANNEL_HEADERS_GEN := \ LIGHTNINGD_CHANNEL_HEADERS_GEN := \
channeld/gen_full_channel_error_names.h \ channeld/gen_full_channel_error_names.h \
channeld/gen_channel_wire.h channeld/channeld_wiregen.h
LIGHTNINGD_CHANNEL_HEADERS_NOGEN := \ LIGHTNINGD_CHANNEL_HEADERS_NOGEN := \
channeld/channeld_htlc.h \ channeld/channeld_htlc.h \
@ -24,7 +24,7 @@ LIGHTNINGD_CHANNEL_HEADERS := $(LIGHTNINGD_CHANNEL_HEADERS_GEN) $(LIGHTNINGD_CHA
LIGHTNINGD_CHANNEL_SRC := channeld/channeld.c \ LIGHTNINGD_CHANNEL_SRC := channeld/channeld.c \
channeld/commit_tx.c \ channeld/commit_tx.c \
channeld/full_channel.c \ channeld/full_channel.c \
channeld/gen_channel_wire.c \ channeld/channeld_wiregen.c \
channeld/watchtower.c channeld/watchtower.c
LIGHTNINGD_CHANNEL_OBJS := $(LIGHTNINGD_CHANNEL_SRC:.c=.o) LIGHTNINGD_CHANNEL_OBJS := $(LIGHTNINGD_CHANNEL_SRC:.c=.o)
@ -97,9 +97,9 @@ CHANNELD_COMMON_OBJS := \
wire/fromwire.o \ wire/fromwire.o \
wire/towire.o wire/towire.o
LIGHTNINGD_CHANNEL_SRC_GEN := $(filter channeld/gen_%, $(LIGHTNINGD_CHANNEL_SRC)) LIGHTNINGD_CHANNEL_SRC_GEN := $(filter channeld/%_wiregen.c, $(LIGHTNINGD_CHANNEL_SRC))
LIGHTNINGD_CHANNEL_SRC_NOGEN := $(filter-out channeld/gen_%, $(LIGHTNINGD_CHANNEL_SRC)) LIGHTNINGD_CHANNEL_SRC_NOGEN := $(filter-out channeld/%_wiregen.c, $(LIGHTNINGD_CHANNEL_SRC))
# Control daemon uses this: # Control daemon uses this:
LIGHTNINGD_CHANNEL_CONTROL_HEADERS := $(LIGHTNINGD_CHANNEL_HEADERS_GEN) LIGHTNINGD_CHANNEL_CONTROL_HEADERS := $(LIGHTNINGD_CHANNEL_HEADERS_GEN)
@ -116,12 +116,6 @@ channeld/gen_full_channel_error_names.h: channeld/full_channel_error.h ccan/ccan
$(LIGHTNINGD_CHANNEL_OBJS): $(LIGHTNINGD_HEADERS) $(LIGHTNINGD_GOSSIP_CONTROL_HEADERS) $(LIGHTNINGD_CHANNEL_OBJS): $(LIGHTNINGD_HEADERS) $(LIGHTNINGD_GOSSIP_CONTROL_HEADERS)
channeld/gen_channel_wire.h: $(WIRE_GEN) channeld/channel_wire.csv
$(WIRE_GEN) --page header $@ channel_wire_type < channeld/channel_wire.csv > $@
channeld/gen_channel_wire.c: $(WIRE_GEN) channeld/channel_wire.csv
$(WIRE_GEN) --page impl ${@:.c=.h} channel_wire_type < channeld/channel_wire.csv > $@
LIGHTNINGD_CHANNEL_OBJS := $(LIGHTNINGD_CHANNEL_SRC:.c=.o) LIGHTNINGD_CHANNEL_OBJS := $(LIGHTNINGD_CHANNEL_SRC:.c=.o)
lightningd/lightning_channeld: $(LIGHTNINGD_CHANNEL_OBJS) $(WIRE_ONION_OBJS) $(CHANNELD_COMMON_OBJS) $(WIRE_OBJS) $(BITCOIN_OBJS) $(LIGHTNINGD_HSM_CLIENT_OBJS) lightningd/lightning_channeld: $(LIGHTNINGD_CHANNEL_OBJS) $(WIRE_ONION_OBJS) $(CHANNELD_COMMON_OBJS) $(WIRE_OBJS) $(BITCOIN_OBJS) $(LIGHTNINGD_HSM_CLIENT_OBJS)

View File

@ -1,230 +0,0 @@
#include <common/cryptomsg.h>
#include <common/channel_config.h>
#include <common/derive_basepoints.h>
#include <common/features.h>
#include <common/fee_states.h>
#include <common/per_peer_state.h>
# Begin! (passes gossipd-client fd)
msgtype,channel_init,1000
msgdata,channel_init,chainparams,chainparams,
msgdata,channel_init,our_features,feature_set,
msgdata,channel_init,funding_txid,bitcoin_txid,
msgdata,channel_init,funding_txout,u16,
msgdata,channel_init,funding_satoshi,amount_sat,
msgdata,channel_init,minimum_depth,u32,
msgdata,channel_init,our_config,channel_config,
msgdata,channel_init,their_config,channel_config,
msgdata,channel_init,fee_states,fee_states,
msgdata,channel_init,feerate_min,u32,
msgdata,channel_init,feerate_max,u32,
msgdata,channel_init,feerate_penalty,u32,
msgdata,channel_init,first_commit_sig,bitcoin_signature,
msgdata,channel_init,per_peer_state,per_peer_state,
msgdata,channel_init,remote_fundingkey,pubkey,
msgdata,channel_init,remote_basepoints,basepoints,
msgdata,channel_init,remote_per_commit,pubkey,
msgdata,channel_init,old_remote_per_commit,pubkey,
msgdata,channel_init,opener,enum side,
msgdata,channel_init,fee_base,u32,
msgdata,channel_init,fee_proportional,u32,
msgdata,channel_init,local_msatoshi,amount_msat,
msgdata,channel_init,our_basepoints,basepoints,
msgdata,channel_init,our_funding_pubkey,pubkey,
msgdata,channel_init,local_node_id,node_id,
msgdata,channel_init,remote_node_id,node_id,
msgdata,channel_init,commit_msec,u32,
msgdata,channel_init,cltv_delta,u16,
msgdata,channel_init,last_was_revoke,bool,
msgdata,channel_init,num_last_sent_commit,u16,
msgdata,channel_init,last_sent_commit,changed_htlc,num_last_sent_commit
msgdata,channel_init,next_index_local,u64,
msgdata,channel_init,next_index_remote,u64,
msgdata,channel_init,revocations_received,u64,
msgdata,channel_init,next_htlc_id,u64,
msgdata,channel_init,num_existing_htlcs,u16,
msgdata,channel_init,htlcs,existing_htlc,num_existing_htlcs
msgdata,channel_init,local_funding_locked,bool,
msgdata,channel_init,remote_funding_locked,bool,
msgdata,channel_init,funding_short_id,short_channel_id,
msgdata,channel_init,reestablish,bool,
msgdata,channel_init,send_shutdown,bool,
msgdata,channel_init,remote_shutdown_received,bool,
msgdata,channel_init,final_scriptpubkey_len,u16,
msgdata,channel_init,final_scriptpubkey,u8,final_scriptpubkey_len
msgdata,channel_init,flags,u8,
msgdata,channel_init,init_peer_pkt_len,u16,
msgdata,channel_init,init_peer_pkt,u8,init_peer_pkt_len
msgdata,channel_init,reached_announce_depth,bool,
msgdata,channel_init,last_remote_secret,secret,
msgdata,channel_init,flen,u16,
msgdata,channel_init,their_features,u8,flen
msgdata,channel_init,upfront_shutdown_script_len,u16,
msgdata,channel_init,upfront_shutdown_script,u8,upfront_shutdown_script_len
msgdata,channel_init,remote_ann_node_sig,?secp256k1_ecdsa_signature,
msgdata,channel_init,remote_ann_bitcoin_sig,?secp256k1_ecdsa_signature,
msgdata,channel_init,option_static_remotekey,bool,
msgdata,channel_init,option_anchor_outputs,bool,
msgdata,channel_init,dev_fast_gossip,bool,
msgdata,channel_init,dev_fail_process_onionpacket,bool,
msgdata,channel_init,num_penalty_bases,u32,
msgdata,channel_init,pbases,penalty_base,num_penalty_bases
# master->channeld funding hit new depth(funding locked if >= lock depth)
msgtype,channel_funding_depth,1002
msgdata,channel_funding_depth,short_channel_id,?short_channel_id,
msgdata,channel_funding_depth,depth,u32,
# Tell channel to offer this htlc
msgtype,channel_offer_htlc,1004
msgdata,channel_offer_htlc,amount_msat,amount_msat,
msgdata,channel_offer_htlc,cltv_expiry,u32,
msgdata,channel_offer_htlc,payment_hash,sha256,
msgdata,channel_offer_htlc,onion_routing_packet,u8,1366
msgdata,channel_offer_htlc,blinding,?pubkey,
# Reply; synchronous since IDs have to increment.
msgtype,channel_offer_htlc_reply,1104
msgdata,channel_offer_htlc_reply,id,u64,
# Empty failure message means success.
msgdata,channel_offer_htlc_reply,len,u16,
msgdata,channel_offer_htlc_reply,failuremsg,u8,len
msgdata,channel_offer_htlc_reply,failurestr,wirestring,
# Main daemon found out the preimage for an HTLC
#include <bitcoin/preimage.h>
msgtype,channel_fulfill_htlc,1005
msgdata,channel_fulfill_htlc,fulfilled_htlc,fulfilled_htlc,
# Main daemon says HTLC failed
msgtype,channel_fail_htlc,1006
msgdata,channel_fail_htlc,failed_htlc,failed_htlc,
# When we receive funding_locked.
msgtype,channel_got_funding_locked,1019
msgdata,channel_got_funding_locked,next_per_commit_point,pubkey,
#include <common/penalty_base.h>
# When we send a commitment_signed message, tell master.
msgtype,channel_sending_commitsig,1020
msgdata,channel_sending_commitsig,commitnum,u64,
msgdata,channel_sending_commitsig,pbase,?penalty_base,
msgdata,channel_sending_commitsig,fee_states,fee_states,
# SENT_ADD_COMMIT, SENT_REMOVE_ACK_COMMIT, SENT_ADD_ACK_COMMIT, SENT_REMOVE_COMMIT
msgdata,channel_sending_commitsig,num_changed,u16,
msgdata,channel_sending_commitsig,changed,changed_htlc,num_changed
msgdata,channel_sending_commitsig,commit_sig,bitcoin_signature,
msgdata,channel_sending_commitsig,num_htlc_sigs,u16,
msgdata,channel_sending_commitsig,htlc_sigs,bitcoin_signature,num_htlc_sigs
# Wait for reply, to make sure it's on disk before we send commit.
msgtype,channel_sending_commitsig_reply,1120
# When we have a commitment_signed message, tell master to remember.
msgtype,channel_got_commitsig,1021
msgdata,channel_got_commitsig,commitnum,u64,
msgdata,channel_got_commitsig,fee_states,fee_states,
msgdata,channel_got_commitsig,signature,bitcoin_signature,
msgdata,channel_got_commitsig,num_htlcs,u16,
msgdata,channel_got_commitsig,htlc_signature,bitcoin_signature,num_htlcs
# RCVD_ADD_COMMIT: we're now committed to their new offered HTLCs.
msgdata,channel_got_commitsig,num_added,u16,
msgdata,channel_got_commitsig,added,added_htlc,num_added
# RCVD_REMOVE_COMMIT: we're now no longer committed to these HTLCs.
msgdata,channel_got_commitsig,num_fulfilled,u16,
msgdata,channel_got_commitsig,fulfilled,fulfilled_htlc,num_fulfilled
msgdata,channel_got_commitsig,num_failed,u16,
msgdata,channel_got_commitsig,failed,failed_htlc,num_failed
# RCVD_ADD_ACK_COMMIT, RCVD_REMOVE_ACK_COMMIT
msgdata,channel_got_commitsig,num_changed,u16,
msgdata,channel_got_commitsig,changed,changed_htlc,num_changed
msgdata,channel_got_commitsig,tx,bitcoin_tx,
# Wait for reply, to make sure it's on disk before we send revocation.
msgtype,channel_got_commitsig_reply,1121
#include <common/htlc_wire.h>
msgtype,channel_got_revoke,1022
msgdata,channel_got_revoke,revokenum,u64,
msgdata,channel_got_revoke,per_commitment_secret,secret,
msgdata,channel_got_revoke,next_per_commit_point,pubkey,
# RCVD_ADD_ACK_REVOCATION, RCVD_REMOVE_ACK_REVOCATION, RCVD_ADD_REVOCATION, RCVD_REMOVE_REVOCATION
msgdata,channel_got_revoke,fee_states,fee_states,
msgdata,channel_got_revoke,num_changed,u16,
msgdata,channel_got_revoke,changed,changed_htlc,num_changed
msgdata,channel_got_revoke,pbase,?penalty_base,
msgdata,channel_got_revoke,penalty_tx,?bitcoin_tx,
# Wait for reply, to make sure it's on disk before we continue
# (eg. if we sent another commitment_signed, that would implicitly ack).
msgtype,channel_got_revoke_reply,1122
# Tell peer to shut down channel.
msgtype,channel_send_shutdown,1023
msgdata,channel_send_shutdown,shutdown_len,u16,
msgdata,channel_send_shutdown,shutdown_scriptpubkey,u8,shutdown_len
# Peer told us that channel is shutting down
msgtype,channel_got_shutdown,1024
msgdata,channel_got_shutdown,scriptpubkey_len,u16,
msgdata,channel_got_shutdown,scriptpubkey,u8,scriptpubkey_len
# Shutdown is complete, ready for closing negotiation. + peer_fd & gossip_fd.
msgtype,channel_shutdown_complete,1025
msgdata,channel_shutdown_complete,per_peer_state,per_peer_state,
# Re-enable commit timer.
msgtype,channel_dev_reenable_commit,1026
msgtype,channel_dev_reenable_commit_reply,1126,
msgtype,channel_feerates,1027
msgdata,channel_feerates,feerate,u32,
msgdata,channel_feerates,min_feerate,u32,
msgdata,channel_feerates,max_feerate,u32,
msgdata,channel_feerates,penalty_feerate,u32,
# master -> channeld: do you have a memleak?
msgtype,channel_dev_memleak,1033
msgtype,channel_dev_memleak_reply,1133
msgdata,channel_dev_memleak_reply,leak,bool,
# Peer presented proof it was from the future.
msgtype,channel_fail_fallen_behind,1028
# This is NULL if option_static_remotekey.
msgdata,channel_fail_fallen_behind,remote_per_commitment_point,?pubkey,
# Handle a channel specific feerate base ppm configuration
msgtype,channel_specific_feerates,1029
msgdata,channel_specific_feerates,feerate_base,u32,
msgdata,channel_specific_feerates,feerate_ppm,u32,
# When we receive announcement_signatures for channel announce
msgtype,channel_got_announcement,1017
msgdata,channel_got_announcement,remote_ann_node_sig,secp256k1_ecdsa_signature,
msgdata,channel_got_announcement,remote_ann_bitcoin_sig,secp256k1_ecdsa_signature,
# Ask channeld to send a error message. Used in forgetting channel case.
msgtype,channel_send_error,1008
msgdata,channel_send_error,reason,wirestring,
# Tell master channeld has sent the error message.
msgtype,channel_send_error_reply,1108
# Tell lightningd we got a onion message (for us, or to fwd)
msgtype,got_onionmsg_to_us,1142
msgdata,got_onionmsg_to_us,reply_blinding,?pubkey,
msgdata,got_onionmsg_to_us,reply_path_len,u16,
msgdata,got_onionmsg_to_us,reply_path,onionmsg_path,reply_path_len
msgtype,got_onionmsg_forward,1143
msgdata,got_onionmsg_forward,next_scid,?short_channel_id,
msgdata,got_onionmsg_forward,next_node_id,?node_id,
msgdata,got_onionmsg_forward,next_blinding,?pubkey,
msgdata,got_onionmsg_forward,next_onion,u8,1366
# Lightningd tells us to send a onion message.
msgtype,send_onionmsg,1040
msgdata,send_onionmsg,onion,u8,1366
msgdata,send_onionmsg,blinding,?pubkey,
1 #include <common/cryptomsg.h>
2 #include <common/channel_config.h>
3 #include <common/derive_basepoints.h>
4 #include <common/features.h>
5 #include <common/fee_states.h>
6 #include <common/per_peer_state.h>
7 # Begin! (passes gossipd-client fd)
8 msgtype,channel_init,1000
9 msgdata,channel_init,chainparams,chainparams,
10 msgdata,channel_init,our_features,feature_set,
11 msgdata,channel_init,funding_txid,bitcoin_txid,
12 msgdata,channel_init,funding_txout,u16,
13 msgdata,channel_init,funding_satoshi,amount_sat,
14 msgdata,channel_init,minimum_depth,u32,
15 msgdata,channel_init,our_config,channel_config,
16 msgdata,channel_init,their_config,channel_config,
17 msgdata,channel_init,fee_states,fee_states,
18 msgdata,channel_init,feerate_min,u32,
19 msgdata,channel_init,feerate_max,u32,
20 msgdata,channel_init,feerate_penalty,u32,
21 msgdata,channel_init,first_commit_sig,bitcoin_signature,
22 msgdata,channel_init,per_peer_state,per_peer_state,
23 msgdata,channel_init,remote_fundingkey,pubkey,
24 msgdata,channel_init,remote_basepoints,basepoints,
25 msgdata,channel_init,remote_per_commit,pubkey,
26 msgdata,channel_init,old_remote_per_commit,pubkey,
27 msgdata,channel_init,opener,enum side,
28 msgdata,channel_init,fee_base,u32,
29 msgdata,channel_init,fee_proportional,u32,
30 msgdata,channel_init,local_msatoshi,amount_msat,
31 msgdata,channel_init,our_basepoints,basepoints,
32 msgdata,channel_init,our_funding_pubkey,pubkey,
33 msgdata,channel_init,local_node_id,node_id,
34 msgdata,channel_init,remote_node_id,node_id,
35 msgdata,channel_init,commit_msec,u32,
36 msgdata,channel_init,cltv_delta,u16,
37 msgdata,channel_init,last_was_revoke,bool,
38 msgdata,channel_init,num_last_sent_commit,u16,
39 msgdata,channel_init,last_sent_commit,changed_htlc,num_last_sent_commit
40 msgdata,channel_init,next_index_local,u64,
41 msgdata,channel_init,next_index_remote,u64,
42 msgdata,channel_init,revocations_received,u64,
43 msgdata,channel_init,next_htlc_id,u64,
44 msgdata,channel_init,num_existing_htlcs,u16,
45 msgdata,channel_init,htlcs,existing_htlc,num_existing_htlcs
46 msgdata,channel_init,local_funding_locked,bool,
47 msgdata,channel_init,remote_funding_locked,bool,
48 msgdata,channel_init,funding_short_id,short_channel_id,
49 msgdata,channel_init,reestablish,bool,
50 msgdata,channel_init,send_shutdown,bool,
51 msgdata,channel_init,remote_shutdown_received,bool,
52 msgdata,channel_init,final_scriptpubkey_len,u16,
53 msgdata,channel_init,final_scriptpubkey,u8,final_scriptpubkey_len
54 msgdata,channel_init,flags,u8,
55 msgdata,channel_init,init_peer_pkt_len,u16,
56 msgdata,channel_init,init_peer_pkt,u8,init_peer_pkt_len
57 msgdata,channel_init,reached_announce_depth,bool,
58 msgdata,channel_init,last_remote_secret,secret,
59 msgdata,channel_init,flen,u16,
60 msgdata,channel_init,their_features,u8,flen
61 msgdata,channel_init,upfront_shutdown_script_len,u16,
62 msgdata,channel_init,upfront_shutdown_script,u8,upfront_shutdown_script_len
63 msgdata,channel_init,remote_ann_node_sig,?secp256k1_ecdsa_signature,
64 msgdata,channel_init,remote_ann_bitcoin_sig,?secp256k1_ecdsa_signature,
65 msgdata,channel_init,option_static_remotekey,bool,
66 msgdata,channel_init,option_anchor_outputs,bool,
67 msgdata,channel_init,dev_fast_gossip,bool,
68 msgdata,channel_init,dev_fail_process_onionpacket,bool,
69 msgdata,channel_init,num_penalty_bases,u32,
70 msgdata,channel_init,pbases,penalty_base,num_penalty_bases
71 # master->channeld funding hit new depth(funding locked if >= lock depth)
72 msgtype,channel_funding_depth,1002
73 msgdata,channel_funding_depth,short_channel_id,?short_channel_id,
74 msgdata,channel_funding_depth,depth,u32,
75 # Tell channel to offer this htlc
76 msgtype,channel_offer_htlc,1004
77 msgdata,channel_offer_htlc,amount_msat,amount_msat,
78 msgdata,channel_offer_htlc,cltv_expiry,u32,
79 msgdata,channel_offer_htlc,payment_hash,sha256,
80 msgdata,channel_offer_htlc,onion_routing_packet,u8,1366
81 msgdata,channel_offer_htlc,blinding,?pubkey,
82 # Reply; synchronous since IDs have to increment.
83 msgtype,channel_offer_htlc_reply,1104
84 msgdata,channel_offer_htlc_reply,id,u64,
85 # Empty failure message means success.
86 msgdata,channel_offer_htlc_reply,len,u16,
87 msgdata,channel_offer_htlc_reply,failuremsg,u8,len
88 msgdata,channel_offer_htlc_reply,failurestr,wirestring,
89 # Main daemon found out the preimage for an HTLC
90 #include <bitcoin/preimage.h>
91 msgtype,channel_fulfill_htlc,1005
92 msgdata,channel_fulfill_htlc,fulfilled_htlc,fulfilled_htlc,
93 # Main daemon says HTLC failed
94 msgtype,channel_fail_htlc,1006
95 msgdata,channel_fail_htlc,failed_htlc,failed_htlc,
96 # When we receive funding_locked.
97 msgtype,channel_got_funding_locked,1019
98 msgdata,channel_got_funding_locked,next_per_commit_point,pubkey,
99 #include <common/penalty_base.h>
100 # When we send a commitment_signed message, tell master.
101 msgtype,channel_sending_commitsig,1020
102 msgdata,channel_sending_commitsig,commitnum,u64,
103 msgdata,channel_sending_commitsig,pbase,?penalty_base,
104 msgdata,channel_sending_commitsig,fee_states,fee_states,
105 # SENT_ADD_COMMIT, SENT_REMOVE_ACK_COMMIT, SENT_ADD_ACK_COMMIT, SENT_REMOVE_COMMIT
106 msgdata,channel_sending_commitsig,num_changed,u16,
107 msgdata,channel_sending_commitsig,changed,changed_htlc,num_changed
108 msgdata,channel_sending_commitsig,commit_sig,bitcoin_signature,
109 msgdata,channel_sending_commitsig,num_htlc_sigs,u16,
110 msgdata,channel_sending_commitsig,htlc_sigs,bitcoin_signature,num_htlc_sigs
111 # Wait for reply, to make sure it's on disk before we send commit.
112 msgtype,channel_sending_commitsig_reply,1120
113 # When we have a commitment_signed message, tell master to remember.
114 msgtype,channel_got_commitsig,1021
115 msgdata,channel_got_commitsig,commitnum,u64,
116 msgdata,channel_got_commitsig,fee_states,fee_states,
117 msgdata,channel_got_commitsig,signature,bitcoin_signature,
118 msgdata,channel_got_commitsig,num_htlcs,u16,
119 msgdata,channel_got_commitsig,htlc_signature,bitcoin_signature,num_htlcs
120 # RCVD_ADD_COMMIT: we're now committed to their new offered HTLCs.
121 msgdata,channel_got_commitsig,num_added,u16,
122 msgdata,channel_got_commitsig,added,added_htlc,num_added
123 # RCVD_REMOVE_COMMIT: we're now no longer committed to these HTLCs.
124 msgdata,channel_got_commitsig,num_fulfilled,u16,
125 msgdata,channel_got_commitsig,fulfilled,fulfilled_htlc,num_fulfilled
126 msgdata,channel_got_commitsig,num_failed,u16,
127 msgdata,channel_got_commitsig,failed,failed_htlc,num_failed
128 # RCVD_ADD_ACK_COMMIT, RCVD_REMOVE_ACK_COMMIT
129 msgdata,channel_got_commitsig,num_changed,u16,
130 msgdata,channel_got_commitsig,changed,changed_htlc,num_changed
131 msgdata,channel_got_commitsig,tx,bitcoin_tx,
132 # Wait for reply, to make sure it's on disk before we send revocation.
133 msgtype,channel_got_commitsig_reply,1121
134 #include <common/htlc_wire.h>
135 msgtype,channel_got_revoke,1022
136 msgdata,channel_got_revoke,revokenum,u64,
137 msgdata,channel_got_revoke,per_commitment_secret,secret,
138 msgdata,channel_got_revoke,next_per_commit_point,pubkey,
139 # RCVD_ADD_ACK_REVOCATION, RCVD_REMOVE_ACK_REVOCATION, RCVD_ADD_REVOCATION, RCVD_REMOVE_REVOCATION
140 msgdata,channel_got_revoke,fee_states,fee_states,
141 msgdata,channel_got_revoke,num_changed,u16,
142 msgdata,channel_got_revoke,changed,changed_htlc,num_changed
143 msgdata,channel_got_revoke,pbase,?penalty_base,
144 msgdata,channel_got_revoke,penalty_tx,?bitcoin_tx,
145 # Wait for reply, to make sure it's on disk before we continue
146 # (eg. if we sent another commitment_signed, that would implicitly ack).
147 msgtype,channel_got_revoke_reply,1122
148 # Tell peer to shut down channel.
149 msgtype,channel_send_shutdown,1023
150 msgdata,channel_send_shutdown,shutdown_len,u16,
151 msgdata,channel_send_shutdown,shutdown_scriptpubkey,u8,shutdown_len
152 # Peer told us that channel is shutting down
153 msgtype,channel_got_shutdown,1024
154 msgdata,channel_got_shutdown,scriptpubkey_len,u16,
155 msgdata,channel_got_shutdown,scriptpubkey,u8,scriptpubkey_len
156 # Shutdown is complete, ready for closing negotiation. + peer_fd & gossip_fd.
157 msgtype,channel_shutdown_complete,1025
158 msgdata,channel_shutdown_complete,per_peer_state,per_peer_state,
159 # Re-enable commit timer.
160 msgtype,channel_dev_reenable_commit,1026
161 msgtype,channel_dev_reenable_commit_reply,1126,
162 msgtype,channel_feerates,1027
163 msgdata,channel_feerates,feerate,u32,
164 msgdata,channel_feerates,min_feerate,u32,
165 msgdata,channel_feerates,max_feerate,u32,
166 msgdata,channel_feerates,penalty_feerate,u32,
167 # master -> channeld: do you have a memleak?
168 msgtype,channel_dev_memleak,1033
169 msgtype,channel_dev_memleak_reply,1133
170 msgdata,channel_dev_memleak_reply,leak,bool,
171 # Peer presented proof it was from the future.
172 msgtype,channel_fail_fallen_behind,1028
173 # This is NULL if option_static_remotekey.
174 msgdata,channel_fail_fallen_behind,remote_per_commitment_point,?pubkey,
175 # Handle a channel specific feerate base ppm configuration
176 msgtype,channel_specific_feerates,1029
177 msgdata,channel_specific_feerates,feerate_base,u32,
178 msgdata,channel_specific_feerates,feerate_ppm,u32,
179 # When we receive announcement_signatures for channel announce
180 msgtype,channel_got_announcement,1017
181 msgdata,channel_got_announcement,remote_ann_node_sig,secp256k1_ecdsa_signature,
182 msgdata,channel_got_announcement,remote_ann_bitcoin_sig,secp256k1_ecdsa_signature,
183 # Ask channeld to send a error message. Used in forgetting channel case.
184 msgtype,channel_send_error,1008
185 msgdata,channel_send_error,reason,wirestring,
186 # Tell master channeld has sent the error message.
187 msgtype,channel_send_error_reply,1108
188 # Tell lightningd we got a onion message (for us, or to fwd)
189 msgtype,got_onionmsg_to_us,1142
190 msgdata,got_onionmsg_to_us,reply_blinding,?pubkey,
191 msgdata,got_onionmsg_to_us,reply_path_len,u16,
192 msgdata,got_onionmsg_to_us,reply_path,onionmsg_path,reply_path_len
193 msgtype,got_onionmsg_forward,1143
194 msgdata,got_onionmsg_forward,next_scid,?short_channel_id,
195 msgdata,got_onionmsg_forward,next_node_id,?node_id,
196 msgdata,got_onionmsg_forward,next_blinding,?pubkey,
197 msgdata,got_onionmsg_forward,next_onion,u8,1366
198 # Lightningd tells us to send a onion message.
199 msgtype,send_onionmsg,1040
200 msgdata,send_onionmsg,onion,u8,1366
201 msgdata,send_onionmsg,blinding,?pubkey,

View File

@ -25,9 +25,9 @@
#include <ccan/take/take.h> #include <ccan/take/take.h>
#include <ccan/tal/str/str.h> #include <ccan/tal/str/str.h>
#include <ccan/time/time.h> #include <ccan/time/time.h>
#include <channeld/channeld_wiregen.h>
#include <channeld/commit_tx.h> #include <channeld/commit_tx.h>
#include <channeld/full_channel.h> #include <channeld/full_channel.h>
#include <channeld/gen_channel_wire.h>
#include <channeld/watchtower.h> #include <channeld/watchtower.h>
#include <common/blinding.h> #include <common/blinding.h>
#include <common/coin_mvt.h> #include <common/coin_mvt.h>
@ -541,7 +541,7 @@ static void channel_announcement_negotiate(struct peer *peer)
/* After making sure short_channel_ids match, we can send remote /* After making sure short_channel_ids match, we can send remote
* announcement to MASTER. */ * announcement to MASTER. */
wire_sync_write(MASTER_FD, wire_sync_write(MASTER_FD,
take(towire_channel_got_announcement(NULL, take(towire_channeld_got_announcement(NULL,
&peer->announcement_node_sigs[REMOTE], &peer->announcement_node_sigs[REMOTE],
&peer->announcement_bitcoin_sigs[REMOTE]))); &peer->announcement_bitcoin_sigs[REMOTE])));
@ -587,7 +587,7 @@ static void handle_peer_funding_locked(struct peer *peer, const u8 *msg)
peer->funding_locked[REMOTE] = true; peer->funding_locked[REMOTE] = true;
wire_sync_write(MASTER_FD, wire_sync_write(MASTER_FD,
take(towire_channel_got_funding_locked(NULL, take(towire_channeld_got_funding_locked(NULL,
&peer->remote_per_commit))); &peer->remote_per_commit)));
channel_announcement_negotiate(peer); channel_announcement_negotiate(peer);
@ -746,7 +746,7 @@ static u8 *sending_commitsig_msg(const tal_t *ctx,
/* We tell master what (of our) HTLCs peer will now be /* We tell master what (of our) HTLCs peer will now be
* committed to. */ * committed to. */
changed = changed_htlc_arr(tmpctx, changed_htlcs); changed = changed_htlc_arr(tmpctx, changed_htlcs);
msg = towire_channel_sending_commitsig(ctx, remote_commit_index, pbase, fee_states, changed, msg = towire_channeld_sending_commitsig(ctx, remote_commit_index, pbase, fee_states, changed,
commit_sig, htlc_sigs); commit_sig, htlc_sigs);
return msg; return msg;
} }
@ -1092,7 +1092,7 @@ static void send_commit(struct peer *peer)
htlc_sigs); htlc_sigs);
/* Message is empty; receiving it is the point. */ /* Message is empty; receiving it is the point. */
master_wait_sync_reply(tmpctx, peer, take(msg), master_wait_sync_reply(tmpctx, peer, take(msg),
WIRE_CHANNEL_SENDING_COMMITSIG_REPLY); WIRE_CHANNELD_SENDING_COMMITSIG_REPLY);
status_debug("Sending commit_sig with %zu htlc sigs", status_debug("Sending commit_sig with %zu htlc sigs",
tal_count(htlc_sigs)); tal_count(htlc_sigs));
@ -1258,7 +1258,7 @@ static void send_revocation(struct peer *peer,
/* We had to do this after channel_sending_revoke_and_ack, since we /* We had to do this after channel_sending_revoke_and_ack, since we
* want it to save the fee_states produced there. */ * want it to save the fee_states produced there. */
msg_for_master msg_for_master
= towire_channel_got_commitsig(NULL, = towire_channeld_got_commitsig(NULL,
peer->next_index[LOCAL] - 1, peer->next_index[LOCAL] - 1,
peer->channel->fee_states, peer->channel->fee_states,
commit_sig, htlc_sigs, commit_sig, htlc_sigs,
@ -1268,7 +1268,7 @@ static void send_revocation(struct peer *peer,
changed, changed,
committx); committx);
master_wait_sync_reply(tmpctx, peer, take(msg_for_master), master_wait_sync_reply(tmpctx, peer, take(msg_for_master),
WIRE_CHANNEL_GOT_COMMITSIG_REPLY); WIRE_CHANNELD_GOT_COMMITSIG_REPLY);
/* Now we can finally send revoke_and_ack to peer */ /* Now we can finally send revoke_and_ack to peer */
sync_crypto_write_no_delay(peer->pps, take(msg)); sync_crypto_write_no_delay(peer->pps, take(msg));
@ -1465,7 +1465,7 @@ static u8 *got_revoke_msg(struct peer *peer, u64 revoke_num,
HSM_FD); HSM_FD);
} }
msg = towire_channel_got_revoke(peer, revoke_num, per_commitment_secret, msg = towire_channeld_got_revoke(peer, revoke_num, per_commitment_secret,
next_per_commit_point, fee_states, next_per_commit_point, fee_states,
changed, pbase, ptx); changed, pbase, ptx);
tal_free(ptx); tal_free(ptx);
@ -1530,7 +1530,7 @@ static void handle_peer_revoke_and_ack(struct peer *peer, const u8 *msg)
changed_htlcs, changed_htlcs,
peer->channel->fee_states); peer->channel->fee_states);
master_wait_sync_reply(tmpctx, peer, take(msg), master_wait_sync_reply(tmpctx, peer, take(msg),
WIRE_CHANNEL_GOT_REVOKE_REPLY); WIRE_CHANNELD_GOT_REVOKE_REPLY);
peer->old_remote_per_commit = peer->remote_per_commit; peer->old_remote_per_commit = peer->remote_per_commit;
peer->remote_per_commit = next_per_commit; peer->remote_per_commit = next_per_commit;
@ -1712,7 +1712,7 @@ static void handle_peer_shutdown(struct peer *peer, const u8 *shutdown)
/* Tell master: we don't have to wait because on reconnect other end /* Tell master: we don't have to wait because on reconnect other end
* will re-send anyway. */ * will re-send anyway. */
wire_sync_write(MASTER_FD, wire_sync_write(MASTER_FD,
take(towire_channel_got_shutdown(NULL, scriptpubkey))); take(towire_channeld_got_shutdown(NULL, scriptpubkey)));
peer->shutdown_sent[REMOTE] = true; peer->shutdown_sent[REMOTE] = true;
/* BOLT #2: /* BOLT #2:
@ -2284,7 +2284,7 @@ static void check_future_dataloss_fields(struct peer *peer,
* commitment transaction on-chain. * commitment transaction on-chain.
*/ */
wire_sync_write(MASTER_FD, wire_sync_write(MASTER_FD,
take(towire_channel_fail_fallen_behind(NULL, take(towire_channeld_fail_fallen_behind(NULL,
remote_current_per_commitment_point))); remote_current_per_commitment_point)));
/* We have to send them an error to trigger dropping to chain. */ /* We have to send them an error to trigger dropping to chain. */
@ -2719,11 +2719,11 @@ static void handle_funding_depth(struct peer *peer, const u8 *msg)
u32 depth; u32 depth;
struct short_channel_id *scid; struct short_channel_id *scid;
if (!fromwire_channel_funding_depth(tmpctx, if (!fromwire_channeld_funding_depth(tmpctx,
msg, msg,
&scid, &scid,
&depth)) &depth))
master_badmsg(WIRE_CHANNEL_FUNDING_DEPTH, msg); master_badmsg(WIRE_CHANNELD_FUNDING_DEPTH, msg);
/* Too late, we're shutting down! */ /* Too late, we're shutting down! */
if (peer->shutdown_sent[LOCAL]) if (peer->shutdown_sent[LOCAL])
@ -2779,10 +2779,10 @@ static void handle_offer_htlc(struct peer *peer, const u8 *inmsg)
status_failed(STATUS_FAIL_MASTER_IO, status_failed(STATUS_FAIL_MASTER_IO,
"funding not locked for offer_htlc"); "funding not locked for offer_htlc");
if (!fromwire_channel_offer_htlc(tmpctx, inmsg, &amount, if (!fromwire_channeld_offer_htlc(tmpctx, inmsg, &amount,
&cltv_expiry, &payment_hash, &cltv_expiry, &payment_hash,
onion_routing_packet, &blinding)) onion_routing_packet, &blinding))
master_badmsg(WIRE_CHANNEL_OFFER_HTLC, inmsg); master_badmsg(WIRE_CHANNELD_OFFER_HTLC, inmsg);
#if EXPERIMENTAL_FEATURES #if EXPERIMENTAL_FEATURES
struct tlv_update_add_tlvs *tlvs; struct tlv_update_add_tlvs *tlvs;
@ -2816,7 +2816,7 @@ static void handle_offer_htlc(struct peer *peer, const u8 *inmsg)
sync_crypto_write(peer->pps, take(msg)); sync_crypto_write(peer->pps, take(msg));
start_commit_timer(peer); start_commit_timer(peer);
/* Tell the master. */ /* Tell the master. */
msg = towire_channel_offer_htlc_reply(NULL, peer->htlc_id, msg = towire_channeld_offer_htlc_reply(NULL, peer->htlc_id,
0, ""); 0, "");
wire_sync_write(MASTER_FD, take(msg)); wire_sync_write(MASTER_FD, take(msg));
peer->htlc_id++; peer->htlc_id++;
@ -2855,7 +2855,7 @@ static void handle_offer_htlc(struct peer *peer, const u8 *inmsg)
abort(); abort();
failed: failed:
msg = towire_channel_offer_htlc_reply(NULL, 0, failwiremsg, failstr); msg = towire_channeld_offer_htlc_reply(NULL, 0, failwiremsg, failstr);
wire_sync_write(MASTER_FD, take(msg)); wire_sync_write(MASTER_FD, take(msg));
} }
@ -2863,11 +2863,11 @@ static void handle_feerates(struct peer *peer, const u8 *inmsg)
{ {
u32 feerate; u32 feerate;
if (!fromwire_channel_feerates(inmsg, &feerate, if (!fromwire_channeld_feerates(inmsg, &feerate,
&peer->feerate_min, &peer->feerate_min,
&peer->feerate_max, &peer->feerate_max,
&peer->feerate_penalty)) &peer->feerate_penalty))
master_badmsg(WIRE_CHANNEL_FEERATES, inmsg); master_badmsg(WIRE_CHANNELD_FEERATES, inmsg);
/* BOLT #2: /* BOLT #2:
* *
@ -2900,10 +2900,10 @@ static void handle_specific_feerates(struct peer *peer, const u8 *inmsg)
u32 base_old = peer->fee_base; u32 base_old = peer->fee_base;
u32 per_satoshi_old = peer->fee_per_satoshi; u32 per_satoshi_old = peer->fee_per_satoshi;
if (!fromwire_channel_specific_feerates(inmsg, if (!fromwire_channeld_specific_feerates(inmsg,
&peer->fee_base, &peer->fee_base,
&peer->fee_per_satoshi)) &peer->fee_per_satoshi))
master_badmsg(WIRE_CHANNEL_SPECIFIC_FEERATES, inmsg); master_badmsg(WIRE_CHANNELD_SPECIFIC_FEERATES, inmsg);
/* only send channel updates if values actually changed */ /* only send channel updates if values actually changed */
if (peer->fee_base != base_old || peer->fee_per_satoshi != per_satoshi_old) if (peer->fee_base != base_old || peer->fee_per_satoshi != per_satoshi_old)
@ -2916,8 +2916,8 @@ static void handle_preimage(struct peer *peer, const u8 *inmsg)
struct fulfilled_htlc fulfilled_htlc; struct fulfilled_htlc fulfilled_htlc;
struct htlc *h; struct htlc *h;
if (!fromwire_channel_fulfill_htlc(inmsg, &fulfilled_htlc)) if (!fromwire_channeld_fulfill_htlc(inmsg, &fulfilled_htlc))
master_badmsg(WIRE_CHANNEL_FULFILL_HTLC, inmsg); master_badmsg(WIRE_CHANNELD_FULFILL_HTLC, inmsg);
switch (channel_fulfill_htlc(peer->channel, REMOTE, switch (channel_fulfill_htlc(peer->channel, REMOTE,
fulfilled_htlc.id, fulfilled_htlc.id,
@ -2948,8 +2948,8 @@ static void handle_fail(struct peer *peer, const u8 *inmsg)
enum channel_remove_err e; enum channel_remove_err e;
struct htlc *h; struct htlc *h;
if (!fromwire_channel_fail_htlc(inmsg, inmsg, &failed_htlc)) if (!fromwire_channeld_fail_htlc(inmsg, inmsg, &failed_htlc))
master_badmsg(WIRE_CHANNEL_FAIL_HTLC, inmsg); master_badmsg(WIRE_CHANNELD_FAIL_HTLC, inmsg);
e = channel_fail_htlc(peer->channel, REMOTE, failed_htlc->id, &h); e = channel_fail_htlc(peer->channel, REMOTE, failed_htlc->id, &h);
switch (e) { switch (e) {
@ -2975,8 +2975,8 @@ static void handle_shutdown_cmd(struct peer *peer, const u8 *inmsg)
{ {
u8 *local_shutdown_script; u8 *local_shutdown_script;
if (!fromwire_channel_send_shutdown(peer, inmsg, &local_shutdown_script)) if (!fromwire_channeld_send_shutdown(peer, inmsg, &local_shutdown_script))
master_badmsg(WIRE_CHANNEL_SEND_SHUTDOWN, inmsg); master_badmsg(WIRE_CHANNELD_SEND_SHUTDOWN, inmsg);
tal_free(peer->final_scriptpubkey); tal_free(peer->final_scriptpubkey);
peer->final_scriptpubkey = local_shutdown_script; peer->final_scriptpubkey = local_shutdown_script;
@ -2989,15 +2989,15 @@ static void handle_shutdown_cmd(struct peer *peer, const u8 *inmsg)
static void handle_send_error(struct peer *peer, const u8 *msg) static void handle_send_error(struct peer *peer, const u8 *msg)
{ {
char *reason; char *reason;
if (!fromwire_channel_send_error(msg, msg, &reason)) if (!fromwire_channeld_send_error(msg, msg, &reason))
master_badmsg(WIRE_CHANNEL_SEND_ERROR, msg); master_badmsg(WIRE_CHANNELD_SEND_ERROR, msg);
status_debug("Send error reason: %s", reason); status_debug("Send error reason: %s", reason);
sync_crypto_write(peer->pps, sync_crypto_write(peer->pps,
take(towire_errorfmt(NULL, &peer->channel_id, take(towire_errorfmt(NULL, &peer->channel_id,
"%s", reason))); "%s", reason)));
wire_sync_write(MASTER_FD, wire_sync_write(MASTER_FD,
take(towire_channel_send_error_reply(NULL))); take(towire_channeld_send_error_reply(NULL)));
} }
#if DEVELOPER #if DEVELOPER
@ -3007,7 +3007,7 @@ static void handle_dev_reenable_commit(struct peer *peer)
start_commit_timer(peer); start_commit_timer(peer);
status_debug("dev_reenable_commit"); status_debug("dev_reenable_commit");
wire_sync_write(MASTER_FD, wire_sync_write(MASTER_FD,
take(towire_channel_dev_reenable_commit_reply(NULL))); take(towire_channeld_dev_reenable_commit_reply(NULL)));
} }
static void handle_dev_memleak(struct peer *peer, const u8 *msg) static void handle_dev_memleak(struct peer *peer, const u8 *msg)
@ -3022,7 +3022,7 @@ static void handle_dev_memleak(struct peer *peer, const u8 *msg)
found_leak = dump_memleak(memtable); found_leak = dump_memleak(memtable);
wire_sync_write(MASTER_FD, wire_sync_write(MASTER_FD,
take(towire_channel_dev_memleak_reply(NULL, take(towire_channeld_dev_memleak_reply(NULL,
found_leak))); found_leak)));
} }
@ -3037,31 +3037,31 @@ static void channeld_send_custommsg(struct peer *peer, const u8 *msg)
static void req_in(struct peer *peer, const u8 *msg) static void req_in(struct peer *peer, const u8 *msg)
{ {
enum channel_wire_type t = fromwire_peektype(msg); enum channeld_wire t = fromwire_peektype(msg);
switch (t) { switch (t) {
case WIRE_CHANNEL_FUNDING_DEPTH: case WIRE_CHANNELD_FUNDING_DEPTH:
handle_funding_depth(peer, msg); handle_funding_depth(peer, msg);
return; return;
case WIRE_CHANNEL_OFFER_HTLC: case WIRE_CHANNELD_OFFER_HTLC:
handle_offer_htlc(peer, msg); handle_offer_htlc(peer, msg);
return; return;
case WIRE_CHANNEL_FEERATES: case WIRE_CHANNELD_FEERATES:
handle_feerates(peer, msg); handle_feerates(peer, msg);
return; return;
case WIRE_CHANNEL_FULFILL_HTLC: case WIRE_CHANNELD_FULFILL_HTLC:
handle_preimage(peer, msg); handle_preimage(peer, msg);
return; return;
case WIRE_CHANNEL_FAIL_HTLC: case WIRE_CHANNELD_FAIL_HTLC:
handle_fail(peer, msg); handle_fail(peer, msg);
return; return;
case WIRE_CHANNEL_SPECIFIC_FEERATES: case WIRE_CHANNELD_SPECIFIC_FEERATES:
handle_specific_feerates(peer, msg); handle_specific_feerates(peer, msg);
return; return;
case WIRE_CHANNEL_SEND_SHUTDOWN: case WIRE_CHANNELD_SEND_SHUTDOWN:
handle_shutdown_cmd(peer, msg); handle_shutdown_cmd(peer, msg);
return; return;
case WIRE_CHANNEL_SEND_ERROR: case WIRE_CHANNELD_SEND_ERROR:
handle_send_error(peer, msg); handle_send_error(peer, msg);
return; return;
#if EXPERIMENTAL_FEATURES #if EXPERIMENTAL_FEATURES
@ -3073,32 +3073,32 @@ static void req_in(struct peer *peer, const u8 *msg)
break; break;
#endif /* !EXPERIMENTAL_FEATURES */ #endif /* !EXPERIMENTAL_FEATURES */
#if DEVELOPER #if DEVELOPER
case WIRE_CHANNEL_DEV_REENABLE_COMMIT: case WIRE_CHANNELD_DEV_REENABLE_COMMIT:
handle_dev_reenable_commit(peer); handle_dev_reenable_commit(peer);
return; return;
case WIRE_CHANNEL_DEV_MEMLEAK: case WIRE_CHANNELD_DEV_MEMLEAK:
handle_dev_memleak(peer, msg); handle_dev_memleak(peer, msg);
return; return;
#else #else
case WIRE_CHANNEL_DEV_REENABLE_COMMIT: case WIRE_CHANNELD_DEV_REENABLE_COMMIT:
case WIRE_CHANNEL_DEV_MEMLEAK: case WIRE_CHANNELD_DEV_MEMLEAK:
#endif /* DEVELOPER */ #endif /* DEVELOPER */
case WIRE_CHANNEL_INIT: case WIRE_CHANNELD_INIT:
case WIRE_CHANNEL_OFFER_HTLC_REPLY: case WIRE_CHANNELD_OFFER_HTLC_REPLY:
case WIRE_CHANNEL_SENDING_COMMITSIG: case WIRE_CHANNELD_SENDING_COMMITSIG:
case WIRE_CHANNEL_GOT_COMMITSIG: case WIRE_CHANNELD_GOT_COMMITSIG:
case WIRE_CHANNEL_GOT_REVOKE: case WIRE_CHANNELD_GOT_REVOKE:
case WIRE_CHANNEL_SENDING_COMMITSIG_REPLY: case WIRE_CHANNELD_SENDING_COMMITSIG_REPLY:
case WIRE_CHANNEL_GOT_COMMITSIG_REPLY: case WIRE_CHANNELD_GOT_COMMITSIG_REPLY:
case WIRE_CHANNEL_GOT_REVOKE_REPLY: case WIRE_CHANNELD_GOT_REVOKE_REPLY:
case WIRE_CHANNEL_GOT_FUNDING_LOCKED: case WIRE_CHANNELD_GOT_FUNDING_LOCKED:
case WIRE_CHANNEL_GOT_ANNOUNCEMENT: case WIRE_CHANNELD_GOT_ANNOUNCEMENT:
case WIRE_CHANNEL_GOT_SHUTDOWN: case WIRE_CHANNELD_GOT_SHUTDOWN:
case WIRE_CHANNEL_SHUTDOWN_COMPLETE: case WIRE_CHANNELD_SHUTDOWN_COMPLETE:
case WIRE_CHANNEL_DEV_REENABLE_COMMIT_REPLY: case WIRE_CHANNELD_DEV_REENABLE_COMMIT_REPLY:
case WIRE_CHANNEL_FAIL_FALLEN_BEHIND: case WIRE_CHANNELD_FAIL_FALLEN_BEHIND:
case WIRE_CHANNEL_DEV_MEMLEAK_REPLY: case WIRE_CHANNELD_DEV_MEMLEAK_REPLY:
case WIRE_CHANNEL_SEND_ERROR_REPLY: case WIRE_CHANNELD_SEND_ERROR_REPLY:
case WIRE_GOT_ONIONMSG_TO_US: case WIRE_GOT_ONIONMSG_TO_US:
case WIRE_GOT_ONIONMSG_FORWARD: case WIRE_GOT_ONIONMSG_FORWARD:
break; break;
@ -3152,7 +3152,7 @@ static void init_channel(struct peer *peer)
status_setup_sync(MASTER_FD); status_setup_sync(MASTER_FD);
msg = wire_sync_read(tmpctx, MASTER_FD); msg = wire_sync_read(tmpctx, MASTER_FD);
if (!fromwire_channel_init(peer, msg, if (!fromwire_channeld_init(peer, msg,
&chainparams, &chainparams,
&peer->our_features, &peer->our_features,
&funding_txid, &funding_txout, &funding_txid, &funding_txout,
@ -3206,7 +3206,7 @@ static void init_channel(struct peer *peer)
&dev_fast_gossip, &dev_fast_gossip,
&dev_fail_process_onionpacket, &dev_fail_process_onionpacket,
&pbases)) { &pbases)) {
master_badmsg(WIRE_CHANNEL_INIT, msg); master_badmsg(WIRE_CHANNELD_INIT, msg);
} }
/* Keeping an array of pointers is better since it allows us to avoid /* Keeping an array of pointers is better since it allows us to avoid
@ -3292,7 +3292,7 @@ static void init_channel(struct peer *peer)
if (peer->channel->opener == LOCAL) if (peer->channel->opener == LOCAL)
peer->desired_feerate = channel_feerate(peer->channel, REMOTE); peer->desired_feerate = channel_feerate(peer->channel, REMOTE);
/* from now we need keep watch over WIRE_CHANNEL_FUNDING_DEPTH */ /* from now we need keep watch over WIRE_CHANNELD_FUNDING_DEPTH */
peer->depth_togo = minimum_depth; peer->depth_togo = minimum_depth;
/* OK, now we can process peer messages. */ /* OK, now we can process peer messages. */
@ -3313,7 +3313,7 @@ static void send_shutdown_complete(struct peer *peer)
{ {
/* Now we can tell master shutdown is complete. */ /* Now we can tell master shutdown is complete. */
wire_sync_write(MASTER_FD, wire_sync_write(MASTER_FD,
take(towire_channel_shutdown_complete(NULL, peer->pps))); take(towire_channeld_shutdown_complete(NULL, peer->pps)));
per_peer_state_fdpass_send(MASTER_FD, peer->pps); per_peer_state_fdpass_send(MASTER_FD, peer->pps);
close(MASTER_FD); close(MASTER_FD);
} }
@ -3390,7 +3390,7 @@ int main(int argc, char *argv[])
msg = msg_dequeue(peer->from_master); msg = msg_dequeue(peer->from_master);
if (msg) { if (msg) {
status_debug("Now dealing with deferred %s", status_debug("Now dealing with deferred %s",
channel_wire_type_name( channeld_wire_name(
fromwire_peektype(msg))); fromwire_peektype(msg)));
req_in(peer, msg); req_in(peer, msg);
tal_free(msg); tal_free(msg);

230
channeld/channeld_wire.csv Normal file
View File

@ -0,0 +1,230 @@
#include <common/cryptomsg.h>
#include <common/channel_config.h>
#include <common/derive_basepoints.h>
#include <common/features.h>
#include <common/fee_states.h>
#include <common/per_peer_state.h>
# Begin! (passes gossipd-client fd)
msgtype,channeld_init,1000
msgdata,channeld_init,chainparams,chainparams,
msgdata,channeld_init,our_features,feature_set,
msgdata,channeld_init,funding_txid,bitcoin_txid,
msgdata,channeld_init,funding_txout,u16,
msgdata,channeld_init,funding_satoshi,amount_sat,
msgdata,channeld_init,minimum_depth,u32,
msgdata,channeld_init,our_config,channel_config,
msgdata,channeld_init,their_config,channel_config,
msgdata,channeld_init,fee_states,fee_states,
msgdata,channeld_init,feerate_min,u32,
msgdata,channeld_init,feerate_max,u32,
msgdata,channeld_init,feerate_penalty,u32,
msgdata,channeld_init,first_commit_sig,bitcoin_signature,
msgdata,channeld_init,per_peer_state,per_peer_state,
msgdata,channeld_init,remote_fundingkey,pubkey,
msgdata,channeld_init,remote_basepoints,basepoints,
msgdata,channeld_init,remote_per_commit,pubkey,
msgdata,channeld_init,old_remote_per_commit,pubkey,
msgdata,channeld_init,opener,enum side,
msgdata,channeld_init,fee_base,u32,
msgdata,channeld_init,fee_proportional,u32,
msgdata,channeld_init,local_msatoshi,amount_msat,
msgdata,channeld_init,our_basepoints,basepoints,
msgdata,channeld_init,our_funding_pubkey,pubkey,
msgdata,channeld_init,local_node_id,node_id,
msgdata,channeld_init,remote_node_id,node_id,
msgdata,channeld_init,commit_msec,u32,
msgdata,channeld_init,cltv_delta,u16,
msgdata,channeld_init,last_was_revoke,bool,
msgdata,channeld_init,num_last_sent_commit,u16,
msgdata,channeld_init,last_sent_commit,changed_htlc,num_last_sent_commit
msgdata,channeld_init,next_index_local,u64,
msgdata,channeld_init,next_index_remote,u64,
msgdata,channeld_init,revocations_received,u64,
msgdata,channeld_init,next_htlc_id,u64,
msgdata,channeld_init,num_existing_htlcs,u16,
msgdata,channeld_init,htlcs,existing_htlc,num_existing_htlcs
msgdata,channeld_init,local_funding_locked,bool,
msgdata,channeld_init,remote_funding_locked,bool,
msgdata,channeld_init,funding_short_id,short_channel_id,
msgdata,channeld_init,reestablish,bool,
msgdata,channeld_init,send_shutdown,bool,
msgdata,channeld_init,remote_shutdown_received,bool,
msgdata,channeld_init,final_scriptpubkey_len,u16,
msgdata,channeld_init,final_scriptpubkey,u8,final_scriptpubkey_len
msgdata,channeld_init,flags,u8,
msgdata,channeld_init,init_peer_pkt_len,u16,
msgdata,channeld_init,init_peer_pkt,u8,init_peer_pkt_len
msgdata,channeld_init,reached_announce_depth,bool,
msgdata,channeld_init,last_remote_secret,secret,
msgdata,channeld_init,flen,u16,
msgdata,channeld_init,their_features,u8,flen
msgdata,channeld_init,upfront_shutdown_script_len,u16,
msgdata,channeld_init,upfront_shutdown_script,u8,upfront_shutdown_script_len
msgdata,channeld_init,remote_ann_node_sig,?secp256k1_ecdsa_signature,
msgdata,channeld_init,remote_ann_bitcoin_sig,?secp256k1_ecdsa_signature,
msgdata,channeld_init,option_static_remotekey,bool,
msgdata,channeld_init,option_anchor_outputs,bool,
msgdata,channeld_init,dev_fast_gossip,bool,
msgdata,channeld_init,dev_fail_process_onionpacket,bool,
msgdata,channeld_init,num_penalty_bases,u32,
msgdata,channeld_init,pbases,penalty_base,num_penalty_bases
# master->channeld funding hit new depth(funding locked if >= lock depth)
msgtype,channeld_funding_depth,1002
msgdata,channeld_funding_depth,short_channel_id,?short_channel_id,
msgdata,channeld_funding_depth,depth,u32,
# Tell channel to offer this htlc
msgtype,channeld_offer_htlc,1004
msgdata,channeld_offer_htlc,amount_msat,amount_msat,
msgdata,channeld_offer_htlc,cltv_expiry,u32,
msgdata,channeld_offer_htlc,payment_hash,sha256,
msgdata,channeld_offer_htlc,onion_routing_packet,u8,1366
msgdata,channeld_offer_htlc,blinding,?pubkey,
# Reply; synchronous since IDs have to increment.
msgtype,channeld_offer_htlc_reply,1104
msgdata,channeld_offer_htlc_reply,id,u64,
# Empty failure message means success.
msgdata,channeld_offer_htlc_reply,len,u16,
msgdata,channeld_offer_htlc_reply,failuremsg,u8,len
msgdata,channeld_offer_htlc_reply,failurestr,wirestring,
# Main daemon found out the preimage for an HTLC
#include <bitcoin/preimage.h>
msgtype,channeld_fulfill_htlc,1005
msgdata,channeld_fulfill_htlc,fulfilled_htlc,fulfilled_htlc,
# Main daemon says HTLC failed
msgtype,channeld_fail_htlc,1006
msgdata,channeld_fail_htlc,failed_htlc,failed_htlc,
# When we receive funding_locked.
msgtype,channeld_got_funding_locked,1019
msgdata,channeld_got_funding_locked,next_per_commit_point,pubkey,
#include <common/penalty_base.h>
# When we send a commitment_signed message, tell master.
msgtype,channeld_sending_commitsig,1020
msgdata,channeld_sending_commitsig,commitnum,u64,
msgdata,channeld_sending_commitsig,pbase,?penalty_base,
msgdata,channeld_sending_commitsig,fee_states,fee_states,
# SENT_ADD_COMMIT, SENT_REMOVE_ACK_COMMIT, SENT_ADD_ACK_COMMIT, SENT_REMOVE_COMMIT
msgdata,channeld_sending_commitsig,num_changed,u16,
msgdata,channeld_sending_commitsig,changed,changed_htlc,num_changed
msgdata,channeld_sending_commitsig,commit_sig,bitcoin_signature,
msgdata,channeld_sending_commitsig,num_htlc_sigs,u16,
msgdata,channeld_sending_commitsig,htlc_sigs,bitcoin_signature,num_htlc_sigs
# Wait for reply, to make sure it's on disk before we send commit.
msgtype,channeld_sending_commitsig_reply,1120
# When we have a commitment_signed message, tell master to remember.
msgtype,channeld_got_commitsig,1021
msgdata,channeld_got_commitsig,commitnum,u64,
msgdata,channeld_got_commitsig,fee_states,fee_states,
msgdata,channeld_got_commitsig,signature,bitcoin_signature,
msgdata,channeld_got_commitsig,num_htlcs,u16,
msgdata,channeld_got_commitsig,htlc_signature,bitcoin_signature,num_htlcs
# RCVD_ADD_COMMIT: we're now committed to their new offered HTLCs.
msgdata,channeld_got_commitsig,num_added,u16,
msgdata,channeld_got_commitsig,added,added_htlc,num_added
# RCVD_REMOVE_COMMIT: we're now no longer committed to these HTLCs.
msgdata,channeld_got_commitsig,num_fulfilled,u16,
msgdata,channeld_got_commitsig,fulfilled,fulfilled_htlc,num_fulfilled
msgdata,channeld_got_commitsig,num_failed,u16,
msgdata,channeld_got_commitsig,failed,failed_htlc,num_failed
# RCVD_ADD_ACK_COMMIT, RCVD_REMOVE_ACK_COMMIT
msgdata,channeld_got_commitsig,num_changed,u16,
msgdata,channeld_got_commitsig,changed,changed_htlc,num_changed
msgdata,channeld_got_commitsig,tx,bitcoin_tx,
# Wait for reply, to make sure it's on disk before we send revocation.
msgtype,channeld_got_commitsig_reply,1121
#include <common/htlc_wire.h>
msgtype,channeld_got_revoke,1022
msgdata,channeld_got_revoke,revokenum,u64,
msgdata,channeld_got_revoke,per_commitment_secret,secret,
msgdata,channeld_got_revoke,next_per_commit_point,pubkey,
# RCVD_ADD_ACK_REVOCATION, RCVD_REMOVE_ACK_REVOCATION, RCVD_ADD_REVOCATION, RCVD_REMOVE_REVOCATION
msgdata,channeld_got_revoke,fee_states,fee_states,
msgdata,channeld_got_revoke,num_changed,u16,
msgdata,channeld_got_revoke,changed,changed_htlc,num_changed
msgdata,channeld_got_revoke,pbase,?penalty_base,
msgdata,channeld_got_revoke,penalty_tx,?bitcoin_tx,
# Wait for reply, to make sure it's on disk before we continue
# (eg. if we sent another commitment_signed, that would implicitly ack).
msgtype,channeld_got_revoke_reply,1122
# Tell peer to shut down channel.
msgtype,channeld_send_shutdown,1023
msgdata,channeld_send_shutdown,shutdown_len,u16,
msgdata,channeld_send_shutdown,shutdown_scriptpubkey,u8,shutdown_len
# Peer told us that channel is shutting down
msgtype,channeld_got_shutdown,1024
msgdata,channeld_got_shutdown,scriptpubkey_len,u16,
msgdata,channeld_got_shutdown,scriptpubkey,u8,scriptpubkey_len
# Shutdown is complete, ready for closing negotiation. + peer_fd & gossip_fd.
msgtype,channeld_shutdown_complete,1025
msgdata,channeld_shutdown_complete,per_peer_state,per_peer_state,
# Re-enable commit timer.
msgtype,channeld_dev_reenable_commit,1026
msgtype,channeld_dev_reenable_commit_reply,1126,
msgtype,channeld_feerates,1027
msgdata,channeld_feerates,feerate,u32,
msgdata,channeld_feerates,min_feerate,u32,
msgdata,channeld_feerates,max_feerate,u32,
msgdata,channeld_feerates,penalty_feerate,u32,
# master -> channeld: do you have a memleak?
msgtype,channeld_dev_memleak,1033
msgtype,channeld_dev_memleak_reply,1133
msgdata,channeld_dev_memleak_reply,leak,bool,
# Peer presented proof it was from the future.
msgtype,channeld_fail_fallen_behind,1028
# This is NULL if option_static_remotekey.
msgdata,channeld_fail_fallen_behind,remote_per_commitment_point,?pubkey,
# Handle a channel specific feerate base ppm configuration
msgtype,channeld_specific_feerates,1029
msgdata,channeld_specific_feerates,feerate_base,u32,
msgdata,channeld_specific_feerates,feerate_ppm,u32,
# When we receive announcement_signatures for channel announce
msgtype,channeld_got_announcement,1017
msgdata,channeld_got_announcement,remote_ann_node_sig,secp256k1_ecdsa_signature,
msgdata,channeld_got_announcement,remote_ann_bitcoin_sig,secp256k1_ecdsa_signature,
# Ask channeld to send a error message. Used in forgetting channel case.
msgtype,channeld_send_error,1008
msgdata,channeld_send_error,reason,wirestring,
# Tell master channeld has sent the error message.
msgtype,channeld_send_error_reply,1108
# Tell lightningd we got a onion message (for us, or to fwd)
msgtype,got_onionmsg_to_us,1142
msgdata,got_onionmsg_to_us,reply_blinding,?pubkey,
msgdata,got_onionmsg_to_us,reply_path_len,u16,
msgdata,got_onionmsg_to_us,reply_path,onionmsg_path,reply_path_len
msgtype,got_onionmsg_forward,1143
msgdata,got_onionmsg_forward,next_scid,?short_channel_id,
msgdata,got_onionmsg_forward,next_node_id,?node_id,
msgdata,got_onionmsg_forward,next_blinding,?pubkey,
msgdata,got_onionmsg_forward,next_onion,u8,1366
# Lightningd tells us to send a onion message.
msgtype,send_onionmsg,1040
msgdata,send_onionmsg,onion,u8,1366
msgdata,send_onionmsg,blinding,?pubkey,
1 #include <common/cryptomsg.h>
2 #include <common/channel_config.h>
3 #include <common/derive_basepoints.h>
4 #include <common/features.h>
5 #include <common/fee_states.h>
6 #include <common/per_peer_state.h>
7 # Begin! (passes gossipd-client fd)
8 msgtype,channeld_init,1000
9 msgdata,channeld_init,chainparams,chainparams,
10 msgdata,channeld_init,our_features,feature_set,
11 msgdata,channeld_init,funding_txid,bitcoin_txid,
12 msgdata,channeld_init,funding_txout,u16,
13 msgdata,channeld_init,funding_satoshi,amount_sat,
14 msgdata,channeld_init,minimum_depth,u32,
15 msgdata,channeld_init,our_config,channel_config,
16 msgdata,channeld_init,their_config,channel_config,
17 msgdata,channeld_init,fee_states,fee_states,
18 msgdata,channeld_init,feerate_min,u32,
19 msgdata,channeld_init,feerate_max,u32,
20 msgdata,channeld_init,feerate_penalty,u32,
21 msgdata,channeld_init,first_commit_sig,bitcoin_signature,
22 msgdata,channeld_init,per_peer_state,per_peer_state,
23 msgdata,channeld_init,remote_fundingkey,pubkey,
24 msgdata,channeld_init,remote_basepoints,basepoints,
25 msgdata,channeld_init,remote_per_commit,pubkey,
26 msgdata,channeld_init,old_remote_per_commit,pubkey,
27 msgdata,channeld_init,opener,enum side,
28 msgdata,channeld_init,fee_base,u32,
29 msgdata,channeld_init,fee_proportional,u32,
30 msgdata,channeld_init,local_msatoshi,amount_msat,
31 msgdata,channeld_init,our_basepoints,basepoints,
32 msgdata,channeld_init,our_funding_pubkey,pubkey,
33 msgdata,channeld_init,local_node_id,node_id,
34 msgdata,channeld_init,remote_node_id,node_id,
35 msgdata,channeld_init,commit_msec,u32,
36 msgdata,channeld_init,cltv_delta,u16,
37 msgdata,channeld_init,last_was_revoke,bool,
38 msgdata,channeld_init,num_last_sent_commit,u16,
39 msgdata,channeld_init,last_sent_commit,changed_htlc,num_last_sent_commit
40 msgdata,channeld_init,next_index_local,u64,
41 msgdata,channeld_init,next_index_remote,u64,
42 msgdata,channeld_init,revocations_received,u64,
43 msgdata,channeld_init,next_htlc_id,u64,
44 msgdata,channeld_init,num_existing_htlcs,u16,
45 msgdata,channeld_init,htlcs,existing_htlc,num_existing_htlcs
46 msgdata,channeld_init,local_funding_locked,bool,
47 msgdata,channeld_init,remote_funding_locked,bool,
48 msgdata,channeld_init,funding_short_id,short_channel_id,
49 msgdata,channeld_init,reestablish,bool,
50 msgdata,channeld_init,send_shutdown,bool,
51 msgdata,channeld_init,remote_shutdown_received,bool,
52 msgdata,channeld_init,final_scriptpubkey_len,u16,
53 msgdata,channeld_init,final_scriptpubkey,u8,final_scriptpubkey_len
54 msgdata,channeld_init,flags,u8,
55 msgdata,channeld_init,init_peer_pkt_len,u16,
56 msgdata,channeld_init,init_peer_pkt,u8,init_peer_pkt_len
57 msgdata,channeld_init,reached_announce_depth,bool,
58 msgdata,channeld_init,last_remote_secret,secret,
59 msgdata,channeld_init,flen,u16,
60 msgdata,channeld_init,their_features,u8,flen
61 msgdata,channeld_init,upfront_shutdown_script_len,u16,
62 msgdata,channeld_init,upfront_shutdown_script,u8,upfront_shutdown_script_len
63 msgdata,channeld_init,remote_ann_node_sig,?secp256k1_ecdsa_signature,
64 msgdata,channeld_init,remote_ann_bitcoin_sig,?secp256k1_ecdsa_signature,
65 msgdata,channeld_init,option_static_remotekey,bool,
66 msgdata,channeld_init,option_anchor_outputs,bool,
67 msgdata,channeld_init,dev_fast_gossip,bool,
68 msgdata,channeld_init,dev_fail_process_onionpacket,bool,
69 msgdata,channeld_init,num_penalty_bases,u32,
70 msgdata,channeld_init,pbases,penalty_base,num_penalty_bases
71 # master->channeld funding hit new depth(funding locked if >= lock depth)
72 msgtype,channeld_funding_depth,1002
73 msgdata,channeld_funding_depth,short_channel_id,?short_channel_id,
74 msgdata,channeld_funding_depth,depth,u32,
75 # Tell channel to offer this htlc
76 msgtype,channeld_offer_htlc,1004
77 msgdata,channeld_offer_htlc,amount_msat,amount_msat,
78 msgdata,channeld_offer_htlc,cltv_expiry,u32,
79 msgdata,channeld_offer_htlc,payment_hash,sha256,
80 msgdata,channeld_offer_htlc,onion_routing_packet,u8,1366
81 msgdata,channeld_offer_htlc,blinding,?pubkey,
82 # Reply; synchronous since IDs have to increment.
83 msgtype,channeld_offer_htlc_reply,1104
84 msgdata,channeld_offer_htlc_reply,id,u64,
85 # Empty failure message means success.
86 msgdata,channeld_offer_htlc_reply,len,u16,
87 msgdata,channeld_offer_htlc_reply,failuremsg,u8,len
88 msgdata,channeld_offer_htlc_reply,failurestr,wirestring,
89 # Main daemon found out the preimage for an HTLC
90 #include <bitcoin/preimage.h>
91 msgtype,channeld_fulfill_htlc,1005
92 msgdata,channeld_fulfill_htlc,fulfilled_htlc,fulfilled_htlc,
93 # Main daemon says HTLC failed
94 msgtype,channeld_fail_htlc,1006
95 msgdata,channeld_fail_htlc,failed_htlc,failed_htlc,
96 # When we receive funding_locked.
97 msgtype,channeld_got_funding_locked,1019
98 msgdata,channeld_got_funding_locked,next_per_commit_point,pubkey,
99 #include <common/penalty_base.h>
100 # When we send a commitment_signed message, tell master.
101 msgtype,channeld_sending_commitsig,1020
102 msgdata,channeld_sending_commitsig,commitnum,u64,
103 msgdata,channeld_sending_commitsig,pbase,?penalty_base,
104 msgdata,channeld_sending_commitsig,fee_states,fee_states,
105 # SENT_ADD_COMMIT, SENT_REMOVE_ACK_COMMIT, SENT_ADD_ACK_COMMIT, SENT_REMOVE_COMMIT
106 msgdata,channeld_sending_commitsig,num_changed,u16,
107 msgdata,channeld_sending_commitsig,changed,changed_htlc,num_changed
108 msgdata,channeld_sending_commitsig,commit_sig,bitcoin_signature,
109 msgdata,channeld_sending_commitsig,num_htlc_sigs,u16,
110 msgdata,channeld_sending_commitsig,htlc_sigs,bitcoin_signature,num_htlc_sigs
111 # Wait for reply, to make sure it's on disk before we send commit.
112 msgtype,channeld_sending_commitsig_reply,1120
113 # When we have a commitment_signed message, tell master to remember.
114 msgtype,channeld_got_commitsig,1021
115 msgdata,channeld_got_commitsig,commitnum,u64,
116 msgdata,channeld_got_commitsig,fee_states,fee_states,
117 msgdata,channeld_got_commitsig,signature,bitcoin_signature,
118 msgdata,channeld_got_commitsig,num_htlcs,u16,
119 msgdata,channeld_got_commitsig,htlc_signature,bitcoin_signature,num_htlcs
120 # RCVD_ADD_COMMIT: we're now committed to their new offered HTLCs.
121 msgdata,channeld_got_commitsig,num_added,u16,
122 msgdata,channeld_got_commitsig,added,added_htlc,num_added
123 # RCVD_REMOVE_COMMIT: we're now no longer committed to these HTLCs.
124 msgdata,channeld_got_commitsig,num_fulfilled,u16,
125 msgdata,channeld_got_commitsig,fulfilled,fulfilled_htlc,num_fulfilled
126 msgdata,channeld_got_commitsig,num_failed,u16,
127 msgdata,channeld_got_commitsig,failed,failed_htlc,num_failed
128 # RCVD_ADD_ACK_COMMIT, RCVD_REMOVE_ACK_COMMIT
129 msgdata,channeld_got_commitsig,num_changed,u16,
130 msgdata,channeld_got_commitsig,changed,changed_htlc,num_changed
131 msgdata,channeld_got_commitsig,tx,bitcoin_tx,
132 # Wait for reply, to make sure it's on disk before we send revocation.
133 msgtype,channeld_got_commitsig_reply,1121
134 #include <common/htlc_wire.h>
135 msgtype,channeld_got_revoke,1022
136 msgdata,channeld_got_revoke,revokenum,u64,
137 msgdata,channeld_got_revoke,per_commitment_secret,secret,
138 msgdata,channeld_got_revoke,next_per_commit_point,pubkey,
139 # RCVD_ADD_ACK_REVOCATION, RCVD_REMOVE_ACK_REVOCATION, RCVD_ADD_REVOCATION, RCVD_REMOVE_REVOCATION
140 msgdata,channeld_got_revoke,fee_states,fee_states,
141 msgdata,channeld_got_revoke,num_changed,u16,
142 msgdata,channeld_got_revoke,changed,changed_htlc,num_changed
143 msgdata,channeld_got_revoke,pbase,?penalty_base,
144 msgdata,channeld_got_revoke,penalty_tx,?bitcoin_tx,
145 # Wait for reply, to make sure it's on disk before we continue
146 # (eg. if we sent another commitment_signed, that would implicitly ack).
147 msgtype,channeld_got_revoke_reply,1122
148 # Tell peer to shut down channel.
149 msgtype,channeld_send_shutdown,1023
150 msgdata,channeld_send_shutdown,shutdown_len,u16,
151 msgdata,channeld_send_shutdown,shutdown_scriptpubkey,u8,shutdown_len
152 # Peer told us that channel is shutting down
153 msgtype,channeld_got_shutdown,1024
154 msgdata,channeld_got_shutdown,scriptpubkey_len,u16,
155 msgdata,channeld_got_shutdown,scriptpubkey,u8,scriptpubkey_len
156 # Shutdown is complete, ready for closing negotiation. + peer_fd & gossip_fd.
157 msgtype,channeld_shutdown_complete,1025
158 msgdata,channeld_shutdown_complete,per_peer_state,per_peer_state,
159 # Re-enable commit timer.
160 msgtype,channeld_dev_reenable_commit,1026
161 msgtype,channeld_dev_reenable_commit_reply,1126,
162 msgtype,channeld_feerates,1027
163 msgdata,channeld_feerates,feerate,u32,
164 msgdata,channeld_feerates,min_feerate,u32,
165 msgdata,channeld_feerates,max_feerate,u32,
166 msgdata,channeld_feerates,penalty_feerate,u32,
167 # master -> channeld: do you have a memleak?
168 msgtype,channeld_dev_memleak,1033
169 msgtype,channeld_dev_memleak_reply,1133
170 msgdata,channeld_dev_memleak_reply,leak,bool,
171 # Peer presented proof it was from the future.
172 msgtype,channeld_fail_fallen_behind,1028
173 # This is NULL if option_static_remotekey.
174 msgdata,channeld_fail_fallen_behind,remote_per_commitment_point,?pubkey,
175 # Handle a channel specific feerate base ppm configuration
176 msgtype,channeld_specific_feerates,1029
177 msgdata,channeld_specific_feerates,feerate_base,u32,
178 msgdata,channeld_specific_feerates,feerate_ppm,u32,
179 # When we receive announcement_signatures for channel announce
180 msgtype,channeld_got_announcement,1017
181 msgdata,channeld_got_announcement,remote_ann_node_sig,secp256k1_ecdsa_signature,
182 msgdata,channeld_got_announcement,remote_ann_bitcoin_sig,secp256k1_ecdsa_signature,
183 # Ask channeld to send a error message. Used in forgetting channel case.
184 msgtype,channeld_send_error,1008
185 msgdata,channeld_send_error,reason,wirestring,
186 # Tell master channeld has sent the error message.
187 msgtype,channeld_send_error_reply,1108
188 # Tell lightningd we got a onion message (for us, or to fwd)
189 msgtype,got_onionmsg_to_us,1142
190 msgdata,got_onionmsg_to_us,reply_blinding,?pubkey,
191 msgdata,got_onionmsg_to_us,reply_path_len,u16,
192 msgdata,got_onionmsg_to_us,reply_path,onionmsg_path,reply_path_len
193 msgtype,got_onionmsg_forward,1143
194 msgdata,got_onionmsg_forward,next_scid,?short_channel_id,
195 msgdata,got_onionmsg_forward,next_node_id,?node_id,
196 msgdata,got_onionmsg_forward,next_blinding,?pubkey,
197 msgdata,got_onionmsg_forward,next_onion,u8,1366
198 # Lightningd tells us to send a onion message.
199 msgtype,send_onionmsg,1040
200 msgdata,send_onionmsg,onion,u8,1366
201 msgdata,send_onionmsg,blinding,?pubkey,

View File

@ -1,7 +1,7 @@
#include <bitcoin/pubkey.h> #include <bitcoin/pubkey.h>
#include <bitcoin/script.h> #include <bitcoin/script.h>
#include <ccan/cast/cast.h> #include <ccan/cast/cast.h>
#include <channeld/gen_channel_wire.h> #include <channeld/channeld_wiregen.h>
#include <common/coin_mvt.h> #include <common/coin_mvt.h>
#include <common/features.h> #include <common/features.h>
#include <common/gossip_constants.h> #include <common/gossip_constants.h>
@ -39,7 +39,7 @@ static void update_feerates(struct lightningd *ld, struct channel *channel)
if (!feerate) if (!feerate)
return; return;
msg = towire_channel_feerates(NULL, feerate, msg = towire_channeld_feerates(NULL, feerate,
feerate_min(ld, NULL), feerate_min(ld, NULL),
feerate_max(ld, NULL), feerate_max(ld, NULL),
try_get_feerate(ld->topology, FEERATE_PENALTY)); try_get_feerate(ld->topology, FEERATE_PENALTY));
@ -156,7 +156,7 @@ static void peer_got_funding_locked(struct channel *channel, const u8 *msg)
{ {
struct pubkey next_per_commitment_point; struct pubkey next_per_commitment_point;
if (!fromwire_channel_got_funding_locked(msg, if (!fromwire_channeld_got_funding_locked(msg,
&next_per_commitment_point)) { &next_per_commitment_point)) {
channel_internal_error(channel, channel_internal_error(channel,
"bad channel_got_funding_locked %s", "bad channel_got_funding_locked %s",
@ -183,7 +183,7 @@ static void peer_got_announcement(struct channel *channel, const u8 *msg)
secp256k1_ecdsa_signature remote_ann_node_sig; secp256k1_ecdsa_signature remote_ann_node_sig;
secp256k1_ecdsa_signature remote_ann_bitcoin_sig; secp256k1_ecdsa_signature remote_ann_bitcoin_sig;
if (!fromwire_channel_got_announcement(msg, if (!fromwire_channeld_got_announcement(msg,
&remote_ann_node_sig, &remote_ann_node_sig,
&remote_ann_bitcoin_sig)) { &remote_ann_bitcoin_sig)) {
channel_internal_error(channel, channel_internal_error(channel,
@ -202,7 +202,7 @@ static void peer_got_shutdown(struct channel *channel, const u8 *msg)
u8 *scriptpubkey; u8 *scriptpubkey;
struct lightningd *ld = channel->peer->ld; struct lightningd *ld = channel->peer->ld;
if (!fromwire_channel_got_shutdown(channel, msg, &scriptpubkey)) { if (!fromwire_channeld_got_shutdown(channel, msg, &scriptpubkey)) {
channel_internal_error(channel, "bad channel_got_shutdown %s", channel_internal_error(channel, "bad channel_got_shutdown %s",
tal_hex(msg, msg)); tal_hex(msg, msg));
return; return;
@ -243,7 +243,7 @@ static void peer_got_shutdown(struct channel *channel, const u8 *msg)
static void channel_fail_fallen_behind(struct channel *channel, const u8 *msg) static void channel_fail_fallen_behind(struct channel *channel, const u8 *msg)
{ {
if (!fromwire_channel_fail_fallen_behind(channel, msg, if (!fromwire_channeld_fail_fallen_behind(channel, msg,
cast_const2(struct pubkey **, cast_const2(struct pubkey **,
&channel->future_per_commitment_point))) { &channel->future_per_commitment_point))) {
channel_internal_error(channel, channel_internal_error(channel,
@ -277,7 +277,7 @@ static void peer_start_closingd_after_shutdown(struct channel *channel,
{ {
struct per_peer_state *pps; struct per_peer_state *pps;
if (!fromwire_channel_shutdown_complete(tmpctx, msg, &pps)) { if (!fromwire_channeld_shutdown_complete(tmpctx, msg, &pps)) {
channel_internal_error(channel, "bad shutdown_complete: %s", channel_internal_error(channel, "bad shutdown_complete: %s",
tal_hex(msg, msg)); tal_hex(msg, msg));
return; return;
@ -312,7 +312,7 @@ static void forget(struct channel *channel)
static void handle_error_channel(struct channel *channel, static void handle_error_channel(struct channel *channel,
const u8 *msg) const u8 *msg)
{ {
if (!fromwire_channel_send_error_reply(msg)) { if (!fromwire_channeld_send_error_reply(msg)) {
channel_internal_error(channel, "bad send_error_reply: %s", channel_internal_error(channel, "bad send_error_reply: %s",
tal_hex(tmpctx, msg)); tal_hex(tmpctx, msg));
return; return;
@ -333,44 +333,44 @@ void forget_channel(struct channel *channel, const char *why)
* we just directly remove the channel */ * we just directly remove the channel */
if (channel->owner) if (channel->owner)
subd_send_msg(channel->owner, subd_send_msg(channel->owner,
take(towire_channel_send_error(NULL, why))); take(towire_channeld_send_error(NULL, why)));
else else
forget(channel); forget(channel);
} }
static unsigned channel_msg(struct subd *sd, const u8 *msg, const int *fds) static unsigned channel_msg(struct subd *sd, const u8 *msg, const int *fds)
{ {
enum channel_wire_type t = fromwire_peektype(msg); enum channeld_wire t = fromwire_peektype(msg);
switch (t) { switch (t) {
case WIRE_CHANNEL_SENDING_COMMITSIG: case WIRE_CHANNELD_SENDING_COMMITSIG:
peer_sending_commitsig(sd->channel, msg); peer_sending_commitsig(sd->channel, msg);
break; break;
case WIRE_CHANNEL_GOT_COMMITSIG: case WIRE_CHANNELD_GOT_COMMITSIG:
peer_got_commitsig(sd->channel, msg); peer_got_commitsig(sd->channel, msg);
break; break;
case WIRE_CHANNEL_GOT_REVOKE: case WIRE_CHANNELD_GOT_REVOKE:
peer_got_revoke(sd->channel, msg); peer_got_revoke(sd->channel, msg);
break; break;
case WIRE_CHANNEL_GOT_FUNDING_LOCKED: case WIRE_CHANNELD_GOT_FUNDING_LOCKED:
peer_got_funding_locked(sd->channel, msg); peer_got_funding_locked(sd->channel, msg);
break; break;
case WIRE_CHANNEL_GOT_ANNOUNCEMENT: case WIRE_CHANNELD_GOT_ANNOUNCEMENT:
peer_got_announcement(sd->channel, msg); peer_got_announcement(sd->channel, msg);
break; break;
case WIRE_CHANNEL_GOT_SHUTDOWN: case WIRE_CHANNELD_GOT_SHUTDOWN:
peer_got_shutdown(sd->channel, msg); peer_got_shutdown(sd->channel, msg);
break; break;
case WIRE_CHANNEL_SHUTDOWN_COMPLETE: case WIRE_CHANNELD_SHUTDOWN_COMPLETE:
/* We expect 3 fds. */ /* We expect 3 fds. */
if (!fds) if (!fds)
return 3; return 3;
peer_start_closingd_after_shutdown(sd->channel, msg, fds); peer_start_closingd_after_shutdown(sd->channel, msg, fds);
break; break;
case WIRE_CHANNEL_FAIL_FALLEN_BEHIND: case WIRE_CHANNELD_FAIL_FALLEN_BEHIND:
channel_fail_fallen_behind(sd->channel, msg); channel_fail_fallen_behind(sd->channel, msg);
break; break;
case WIRE_CHANNEL_SEND_ERROR_REPLY: case WIRE_CHANNELD_SEND_ERROR_REPLY:
handle_error_channel(sd->channel, msg); handle_error_channel(sd->channel, msg);
break; break;
#if EXPERIMENTAL_FEATURES #if EXPERIMENTAL_FEATURES
@ -385,25 +385,25 @@ static unsigned channel_msg(struct subd *sd, const u8 *msg, const int *fds)
case WIRE_GOT_ONIONMSG_FORWARD: case WIRE_GOT_ONIONMSG_FORWARD:
#endif #endif
/* And we never get these from channeld. */ /* And we never get these from channeld. */
case WIRE_CHANNEL_INIT: case WIRE_CHANNELD_INIT:
case WIRE_CHANNEL_FUNDING_DEPTH: case WIRE_CHANNELD_FUNDING_DEPTH:
case WIRE_CHANNEL_OFFER_HTLC: case WIRE_CHANNELD_OFFER_HTLC:
case WIRE_CHANNEL_FULFILL_HTLC: case WIRE_CHANNELD_FULFILL_HTLC:
case WIRE_CHANNEL_FAIL_HTLC: case WIRE_CHANNELD_FAIL_HTLC:
case WIRE_CHANNEL_GOT_COMMITSIG_REPLY: case WIRE_CHANNELD_GOT_COMMITSIG_REPLY:
case WIRE_CHANNEL_GOT_REVOKE_REPLY: case WIRE_CHANNELD_GOT_REVOKE_REPLY:
case WIRE_CHANNEL_SENDING_COMMITSIG_REPLY: case WIRE_CHANNELD_SENDING_COMMITSIG_REPLY:
case WIRE_CHANNEL_SEND_SHUTDOWN: case WIRE_CHANNELD_SEND_SHUTDOWN:
case WIRE_CHANNEL_DEV_REENABLE_COMMIT: case WIRE_CHANNELD_DEV_REENABLE_COMMIT:
case WIRE_CHANNEL_FEERATES: case WIRE_CHANNELD_FEERATES:
case WIRE_CHANNEL_SPECIFIC_FEERATES: case WIRE_CHANNELD_SPECIFIC_FEERATES:
case WIRE_CHANNEL_DEV_MEMLEAK: case WIRE_CHANNELD_DEV_MEMLEAK:
case WIRE_SEND_ONIONMSG: case WIRE_SEND_ONIONMSG:
/* Replies go to requests. */ /* Replies go to requests. */
case WIRE_CHANNEL_OFFER_HTLC_REPLY: case WIRE_CHANNELD_OFFER_HTLC_REPLY:
case WIRE_CHANNEL_DEV_REENABLE_COMMIT_REPLY: case WIRE_CHANNELD_DEV_REENABLE_COMMIT_REPLY:
case WIRE_CHANNEL_DEV_MEMLEAK_REPLY: case WIRE_CHANNELD_DEV_MEMLEAK_REPLY:
case WIRE_CHANNEL_SEND_ERROR: case WIRE_CHANNELD_SEND_ERROR:
break; break;
} }
@ -453,7 +453,7 @@ void peer_start_channeld(struct channel *channel,
"lightning_channeld", channel, "lightning_channeld", channel,
&channel->peer->id, &channel->peer->id,
channel->log, true, channel->log, true,
channel_wire_type_name, channeld_wire_name,
channel_msg, channel_msg,
channel_errmsg, channel_errmsg,
channel_set_billboard, channel_set_billboard,
@ -521,7 +521,7 @@ void peer_start_channeld(struct channel *channel,
pbases = wallet_penalty_base_load_for_channel( pbases = wallet_penalty_base_load_for_channel(
tmpctx, channel->peer->ld->wallet, channel->dbid); tmpctx, channel->peer->ld->wallet, channel->dbid);
initmsg = towire_channel_init(tmpctx, initmsg = towire_channeld_init(tmpctx,
chainparams, chainparams,
ld->our_features, ld->our_features,
&channel->funding_txid, &channel->funding_txid,
@ -614,7 +614,7 @@ bool channel_tell_depth(struct lightningd *ld,
} }
subd_send_msg(channel->owner, subd_send_msg(channel->owner,
take(towire_channel_funding_depth(NULL, channel->scid, take(towire_channeld_funding_depth(NULL, channel->scid,
depth))); depth)));
if (channel->remote_funding_locked if (channel->remote_funding_locked
@ -867,7 +867,7 @@ static struct command_result *json_dev_feerate(struct command *cmd,
if (!channel || !channel->owner || channel->state != CHANNELD_NORMAL) if (!channel || !channel->owner || channel->state != CHANNELD_NORMAL)
return command_fail(cmd, LIGHTNINGD, "Peer bad state"); return command_fail(cmd, LIGHTNINGD, "Peer bad state");
msg = towire_channel_feerates(NULL, *feerate, msg = towire_channeld_feerates(NULL, *feerate,
feerate_min(cmd->ld, NULL), feerate_min(cmd->ld, NULL),
feerate_max(cmd->ld, NULL), feerate_max(cmd->ld, NULL),
try_get_feerate(cmd->ld->topology, FEERATE_PENALTY)); try_get_feerate(cmd->ld->topology, FEERATE_PENALTY));

View File

@ -1,4 +1,4 @@
#include <channeld/gen_channel_wire.h> #include <channeld/channeld_wiregen.h>
#include <common/json_helpers.h> #include <common/json_helpers.h>
#include <lightningd/channel.h> #include <lightningd/channel.h>
#include <lightningd/lightningd.h> #include <lightningd/lightningd.h>
@ -63,13 +63,13 @@ static bool make_peer_send(struct lightningd *ld,
if (!dst) { if (!dst) {
log_debug(ld->log, "Can't send %s: no channel", log_debug(ld->log, "Can't send %s: no channel",
channel_wire_type_name(fromwire_peektype(msg))); channeld_wire_name(fromwire_peektype(msg)));
return false; return false;
} }
if (!dst->owner) { if (!dst->owner) {
log_debug(ld->log, "Can't send %s: not connected", log_debug(ld->log, "Can't send %s: not connected",
channel_wire_type_name(fromwire_peektype(msg))); channeld_wire_name(fromwire_peektype(msg)));
return false; return false;
} }
@ -77,7 +77,7 @@ static bool make_peer_send(struct lightningd *ld,
* allow incoming via openingd!. */ * allow incoming via openingd!. */
if (!streq(dst->owner->name, "channeld")) { if (!streq(dst->owner->name, "channeld")) {
log_debug(ld->log, "Can't send %s: owned by %s", log_debug(ld->log, "Can't send %s: owned by %s",
channel_wire_type_name(fromwire_peektype(msg)), channeld_wire_name(fromwire_peektype(msg)),
dst->owner->name); dst->owner->name);
return false; return false;
} }

View File

@ -13,7 +13,7 @@
#include <ccan/str/str.h> #include <ccan/str/str.h>
#include <ccan/take/take.h> #include <ccan/take/take.h>
#include <ccan/tal/str/str.h> #include <ccan/tal/str/str.h>
#include <channeld/gen_channel_wire.h> #include <channeld/channeld_wiregen.h>
#include <common/addr.h> #include <common/addr.h>
#include <common/closing_fee.h> #include <common/closing_fee.h>
#include <common/dev_disconnect.h> #include <common/dev_disconnect.h>
@ -1435,7 +1435,7 @@ static struct command_result *json_close(struct command *cmd,
case CHANNELD_SHUTTING_DOWN: case CHANNELD_SHUTTING_DOWN:
if (channel->owner) if (channel->owner)
subd_send_msg(channel->owner, subd_send_msg(channel->owner,
take(towire_channel_send_shutdown(NULL, take(towire_channeld_send_shutdown(NULL,
channel->shutdown_scriptpubkey[LOCAL]))); channel->shutdown_scriptpubkey[LOCAL])));
break; break;
case CLOSINGD_SIGEXCHANGE: case CLOSINGD_SIGEXCHANGE:
@ -1869,7 +1869,7 @@ static void set_channel_fees(struct command *cmd, struct channel *channel,
/* tell channeld to make a send_channel_update */ /* tell channeld to make a send_channel_update */
if (channel->owner && streq(channel->owner->name, "channeld")) if (channel->owner && streq(channel->owner->name, "channeld"))
subd_send_msg(channel->owner, subd_send_msg(channel->owner,
take(towire_channel_specific_feerates(NULL, base, ppm))); take(towire_channeld_specific_feerates(NULL, base, ppm)));
/* save values to database */ /* save values to database */
wallet_channel_save(cmd->ld->wallet, channel); wallet_channel_save(cmd->ld->wallet, channel);
@ -2079,7 +2079,7 @@ static struct command_result *json_dev_reenable_commit(struct command *cmd,
"Peer owned by %s", channel->owner->name); "Peer owned by %s", channel->owner->name);
} }
msg = towire_channel_dev_reenable_commit(channel); msg = towire_channeld_dev_reenable_commit(channel);
subd_req(peer, channel->owner, take(msg), -1, 0, subd_req(peer, channel->owner, take(msg), -1, 0,
dev_reenable_commit_finished, cmd); dev_reenable_commit_finished, cmd);
return command_still_pending(cmd); return command_still_pending(cmd);
@ -2238,7 +2238,7 @@ static void channeld_memleak_req_done(struct subd *channeld,
bool found_leak; bool found_leak;
tal_del_destructor2(channeld, subd_died_forget_memleak, cmd); tal_del_destructor2(channeld, subd_died_forget_memleak, cmd);
if (!fromwire_channel_dev_memleak_reply(msg, &found_leak)) { if (!fromwire_channeld_dev_memleak_reply(msg, &found_leak)) {
was_pending(command_fail(cmd, LIGHTNINGD, was_pending(command_fail(cmd, LIGHTNINGD,
"Bad channel_dev_memleak")); "Bad channel_dev_memleak"));
return; return;
@ -2283,7 +2283,7 @@ static void peer_memleak_req_next(struct command *cmd, struct channel *prev)
/* Note: closingd does its own checking automatically */ /* Note: closingd does its own checking automatically */
if (streq(c->owner->name, "channeld")) { if (streq(c->owner->name, "channeld")) {
subd_req(c, c->owner, subd_req(c, c->owner,
take(towire_channel_dev_memleak(NULL)), take(towire_channeld_dev_memleak(NULL)),
-1, 0, channeld_memleak_req_done, cmd); -1, 0, channeld_memleak_req_done, cmd);
tal_add_destructor2(c->owner, tal_add_destructor2(c->owner,
subd_died_forget_memleak, subd_died_forget_memleak,

View File

@ -5,7 +5,7 @@
#include <ccan/crypto/ripemd160/ripemd160.h> #include <ccan/crypto/ripemd160/ripemd160.h>
#include <ccan/mem/mem.h> #include <ccan/mem/mem.h>
#include <ccan/tal/str/str.h> #include <ccan/tal/str/str.h>
#include <channeld/gen_channel_wire.h> #include <channeld/channeld_wiregen.h>
#include <common/blinding.h> #include <common/blinding.h>
#include <common/coin_mvt.h> #include <common/coin_mvt.h>
#include <common/ecdh.h> #include <common/ecdh.h>
@ -147,7 +147,7 @@ static void tell_channeld_htlc_failed(const struct htlc_in *hin,
return; return;
subd_send_msg(hin->key.channel->owner, subd_send_msg(hin->key.channel->owner,
take(towire_channel_fail_htlc(NULL, failed_htlc))); take(towire_channeld_fail_htlc(NULL, failed_htlc)));
} }
struct failmsg_update_cbdata { struct failmsg_update_cbdata {
@ -434,7 +434,7 @@ void fulfill_htlc(struct htlc_in *hin, const struct preimage *preimage)
struct fulfilled_htlc fulfilled_htlc; struct fulfilled_htlc fulfilled_htlc;
fulfilled_htlc.id = hin->key.id; fulfilled_htlc.id = hin->key.id;
fulfilled_htlc.payment_preimage = *preimage; fulfilled_htlc.payment_preimage = *preimage;
msg = towire_channel_fulfill_htlc(hin, &fulfilled_htlc); msg = towire_channeld_fulfill_htlc(hin, &fulfilled_htlc);
} }
subd_send_msg(channel->owner, take(msg)); subd_send_msg(channel->owner, take(msg));
} }
@ -543,7 +543,7 @@ static void rcvd_htlc_reply(struct subd *subd, const u8 *msg, const int *fds UNU
char *failurestr; char *failurestr;
struct lightningd *ld = subd->ld; struct lightningd *ld = subd->ld;
if (!fromwire_channel_offer_htlc_reply(msg, msg, if (!fromwire_channeld_offer_htlc_reply(msg, msg,
&hout->key.id, &hout->key.id,
&failmsg, &failmsg,
&failurestr)) { &failurestr)) {
@ -664,7 +664,7 @@ const u8 *send_htlc_out(const tal_t *ctx,
out, time_from_sec(30), out, time_from_sec(30),
htlc_offer_timeout, htlc_offer_timeout,
out); out);
msg = towire_channel_offer_htlc(out, amount, cltv, payment_hash, msg = towire_channeld_offer_htlc(out, amount, cltv, payment_hash,
onion_routing_packet, blinding); onion_routing_packet, blinding);
subd_req(out->peer->ld, out->owner, take(msg), -1, 0, rcvd_htlc_reply, subd_req(out->peer->ld, out->owner, take(msg), -1, 0, rcvd_htlc_reply,
*houtp); *houtp);
@ -1706,7 +1706,7 @@ void peer_sending_commitsig(struct channel *channel, const u8 *msg)
channel->htlc_timeout = tal_free(channel->htlc_timeout); channel->htlc_timeout = tal_free(channel->htlc_timeout);
if (!fromwire_channel_sending_commitsig(msg, msg, if (!fromwire_channeld_sending_commitsig(msg, msg,
&commitnum, &commitnum,
&pbase, &pbase,
&fee_states, &fee_states,
@ -1769,7 +1769,7 @@ void peer_sending_commitsig(struct channel *channel, const u8 *msg)
/* Tell it we've got it, and to go ahead with commitment_signed. */ /* Tell it we've got it, and to go ahead with commitment_signed. */
subd_send_msg(channel->owner, subd_send_msg(channel->owner,
take(towire_channel_sending_commitsig_reply(msg))); take(towire_channeld_sending_commitsig_reply(msg)));
} }
static bool channel_added_their_htlc(struct channel *channel, static bool channel_added_their_htlc(struct channel *channel,
@ -1899,7 +1899,7 @@ void peer_got_commitsig(struct channel *channel, const u8 *msg)
size_t i; size_t i;
struct lightningd *ld = channel->peer->ld; struct lightningd *ld = channel->peer->ld;
if (!fromwire_channel_got_commitsig(msg, msg, if (!fromwire_channeld_got_commitsig(msg, msg,
&commitnum, &commitnum,
&fee_states, &fee_states,
&commit_sig, &commit_sig,
@ -1911,7 +1911,7 @@ void peer_got_commitsig(struct channel *channel, const u8 *msg)
&tx) &tx)
|| !fee_states_valid(fee_states, channel->opener)) { || !fee_states_valid(fee_states, channel->opener)) {
channel_internal_error(channel, channel_internal_error(channel,
"bad fromwire_channel_got_commitsig %s", "bad fromwire_channeld_got_commitsig %s",
tal_hex(channel, msg)); tal_hex(channel, msg));
return; return;
} }
@ -1990,7 +1990,7 @@ void peer_got_commitsig(struct channel *channel, const u8 *msg)
channel->last_htlc_sigs); channel->last_htlc_sigs);
/* Tell it we've committed, and to go ahead with revoke. */ /* Tell it we've committed, and to go ahead with revoke. */
msg = towire_channel_got_commitsig_reply(msg); msg = towire_channeld_got_commitsig_reply(msg);
subd_send_msg(channel->owner, take(msg)); subd_send_msg(channel->owner, take(msg));
} }
@ -2053,7 +2053,7 @@ void peer_got_revoke(struct channel *channel, const u8 *msg)
struct commitment_revocation_payload *payload; struct commitment_revocation_payload *payload;
struct bitcoin_tx *penalty_tx; struct bitcoin_tx *penalty_tx;
if (!fromwire_channel_got_revoke(msg, msg, if (!fromwire_channeld_got_revoke(msg, msg,
&revokenum, &per_commitment_secret, &revokenum, &per_commitment_secret,
&next_per_commitment_point, &next_per_commitment_point,
&fee_states, &fee_states,
@ -2061,7 +2061,7 @@ void peer_got_revoke(struct channel *channel, const u8 *msg)
&pbase, &pbase,
&penalty_tx) &penalty_tx)
|| !fee_states_valid(fee_states, channel->opener)) { || !fee_states_valid(fee_states, channel->opener)) {
channel_internal_error(channel, "bad fromwire_channel_got_revoke %s", channel_internal_error(channel, "bad fromwire_channeld_got_revoke %s",
tal_hex(channel, msg)); tal_hex(channel, msg));
return; return;
} }
@ -2126,7 +2126,7 @@ void peer_got_revoke(struct channel *channel, const u8 *msg)
update_per_commit_point(channel, &next_per_commitment_point); update_per_commit_point(channel, &next_per_commitment_point);
/* Tell it we've committed, and to go ahead with revoke. */ /* Tell it we've committed, and to go ahead with revoke. */
msg = towire_channel_got_revoke_reply(msg); msg = towire_channeld_got_revoke_reply(msg);
subd_send_msg(channel->owner, take(msg)); subd_send_msg(channel->owner, take(msg));
/* Now, any HTLCs we need to immediately fail? */ /* Now, any HTLCs we need to immediately fail? */

View File

@ -1,4 +1,4 @@
#include <channeld/gen_channel_wire.h> #include <channeld/channeld_wiregen.h>
#include <common/json_command.h> #include <common/json_command.h>
#include <common/jsonrpc_errors.h> #include <common/jsonrpc_errors.h>
#include <common/param.h> #include <common/param.h>

View File

@ -106,13 +106,13 @@ void fixup_htlcs_out(struct lightningd *ld UNNEEDED)
/* Generated stub for fromwire_bigsize */ /* Generated stub for fromwire_bigsize */
bigsize_t fromwire_bigsize(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) bigsize_t fromwire_bigsize(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
{ fprintf(stderr, "fromwire_bigsize called!\n"); abort(); } { fprintf(stderr, "fromwire_bigsize called!\n"); abort(); }
/* Generated stub for fromwire_channel_dev_memleak_reply */
bool fromwire_channel_dev_memleak_reply(const void *p UNNEEDED, bool *leak UNNEEDED)
{ fprintf(stderr, "fromwire_channel_dev_memleak_reply called!\n"); abort(); }
/* Generated stub for fromwire_channel_id */ /* Generated stub for fromwire_channel_id */
void fromwire_channel_id(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, void fromwire_channel_id(const u8 **cursor UNNEEDED, size_t *max UNNEEDED,
struct channel_id *channel_id UNNEEDED) struct channel_id *channel_id UNNEEDED)
{ fprintf(stderr, "fromwire_channel_id called!\n"); abort(); } { fprintf(stderr, "fromwire_channel_id called!\n"); abort(); }
/* Generated stub for fromwire_channeld_dev_memleak_reply */
bool fromwire_channeld_dev_memleak_reply(const void *p UNNEEDED, bool *leak UNNEEDED)
{ fprintf(stderr, "fromwire_channeld_dev_memleak_reply called!\n"); abort(); }
/* Generated stub for fromwire_connect_peer_connected */ /* 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) 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(); } { fprintf(stderr, "fromwire_connect_peer_connected called!\n"); abort(); }
@ -461,21 +461,21 @@ void subd_send_msg(struct subd *sd UNNEEDED, const u8 *msg_out UNNEEDED)
/* Generated stub for towire_bigsize */ /* Generated stub for towire_bigsize */
void towire_bigsize(u8 **pptr UNNEEDED, const bigsize_t val UNNEEDED) void towire_bigsize(u8 **pptr UNNEEDED, const bigsize_t val UNNEEDED)
{ fprintf(stderr, "towire_bigsize called!\n"); abort(); } { fprintf(stderr, "towire_bigsize called!\n"); abort(); }
/* Generated stub for towire_channel_dev_memleak */
u8 *towire_channel_dev_memleak(const tal_t *ctx UNNEEDED)
{ fprintf(stderr, "towire_channel_dev_memleak called!\n"); abort(); }
/* Generated stub for towire_channel_dev_reenable_commit */
u8 *towire_channel_dev_reenable_commit(const tal_t *ctx UNNEEDED)
{ fprintf(stderr, "towire_channel_dev_reenable_commit called!\n"); abort(); }
/* Generated stub for towire_channel_id */ /* Generated stub for towire_channel_id */
void towire_channel_id(u8 **pptr UNNEEDED, const struct channel_id *channel_id UNNEEDED) void towire_channel_id(u8 **pptr UNNEEDED, const struct channel_id *channel_id UNNEEDED)
{ fprintf(stderr, "towire_channel_id called!\n"); abort(); } { fprintf(stderr, "towire_channel_id called!\n"); abort(); }
/* Generated stub for towire_channel_send_shutdown */ /* Generated stub for towire_channeld_dev_memleak */
u8 *towire_channel_send_shutdown(const tal_t *ctx UNNEEDED, const u8 *shutdown_scriptpubkey UNNEEDED) u8 *towire_channeld_dev_memleak(const tal_t *ctx UNNEEDED)
{ fprintf(stderr, "towire_channel_send_shutdown called!\n"); abort(); } { fprintf(stderr, "towire_channeld_dev_memleak called!\n"); abort(); }
/* Generated stub for towire_channel_specific_feerates */ /* Generated stub for towire_channeld_dev_reenable_commit */
u8 *towire_channel_specific_feerates(const tal_t *ctx UNNEEDED, u32 feerate_base UNNEEDED, u32 feerate_ppm UNNEEDED) u8 *towire_channeld_dev_reenable_commit(const tal_t *ctx UNNEEDED)
{ fprintf(stderr, "towire_channel_specific_feerates called!\n"); abort(); } { fprintf(stderr, "towire_channeld_dev_reenable_commit called!\n"); abort(); }
/* Generated stub for towire_channeld_send_shutdown */
u8 *towire_channeld_send_shutdown(const tal_t *ctx UNNEEDED, const u8 *shutdown_scriptpubkey UNNEEDED)
{ fprintf(stderr, "towire_channeld_send_shutdown called!\n"); abort(); }
/* Generated stub for towire_channeld_specific_feerates */
u8 *towire_channeld_specific_feerates(const tal_t *ctx UNNEEDED, u32 feerate_base UNNEEDED, u32 feerate_ppm UNNEEDED)
{ fprintf(stderr, "towire_channeld_specific_feerates called!\n"); abort(); }
/* Generated stub for towire_connectctl_connect_to_peer */ /* Generated stub for towire_connectctl_connect_to_peer */
u8 *towire_connectctl_connect_to_peer(const tal_t *ctx UNNEEDED, const struct node_id *id UNNEEDED, u32 seconds_waited UNNEEDED, const struct wireaddr_internal *addrhint UNNEEDED) u8 *towire_connectctl_connect_to_peer(const tal_t *ctx UNNEEDED, const struct node_id *id UNNEEDED, u32 seconds_waited UNNEEDED, const struct wireaddr_internal *addrhint UNNEEDED)
{ fprintf(stderr, "towire_connectctl_connect_to_peer called!\n"); abort(); } { fprintf(stderr, "towire_connectctl_connect_to_peer called!\n"); abort(); }

View File

@ -29,12 +29,6 @@ void fromwire_node_id(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, struct n
void json_add_sha256(struct json_stream *result UNNEEDED, const char *fieldname UNNEEDED, void json_add_sha256(struct json_stream *result UNNEEDED, const char *fieldname UNNEEDED,
const struct sha256 *hash UNNEEDED) const struct sha256 *hash UNNEEDED)
{ fprintf(stderr, "json_add_sha256 called!\n"); abort(); } { fprintf(stderr, "json_add_sha256 called!\n"); abort(); }
/* Generated stub for json_to_address_scriptpubkey */
enum address_parse_result json_to_address_scriptpubkey(const tal_t *ctx UNNEEDED,
const struct chainparams *chainparams UNNEEDED,
const char *buffer UNNEEDED,
const jsmntok_t *tok UNNEEDED, const u8 **scriptpubkey UNNEEDED)
{ fprintf(stderr, "json_to_address_scriptpubkey called!\n"); abort(); }
/* Generated stub for json_to_pubkey */ /* Generated stub for json_to_pubkey */
bool json_to_pubkey(const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED, bool json_to_pubkey(const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
struct pubkey *pubkey UNNEEDED) struct pubkey *pubkey UNNEEDED)

View File

@ -111,21 +111,21 @@ char *encode_scriptpubkey_to_addr(const tal_t *ctx UNNEEDED,
/* Generated stub for fatal */ /* Generated stub for fatal */
void fatal(const char *fmt UNNEEDED, ...) void fatal(const char *fmt UNNEEDED, ...)
{ fprintf(stderr, "fatal called!\n"); abort(); } { fprintf(stderr, "fatal called!\n"); abort(); }
/* Generated stub for fromwire_channel_dev_memleak_reply */ /* Generated stub for fromwire_channeld_dev_memleak_reply */
bool fromwire_channel_dev_memleak_reply(const void *p UNNEEDED, bool *leak UNNEEDED) bool fromwire_channeld_dev_memleak_reply(const void *p UNNEEDED, bool *leak UNNEEDED)
{ fprintf(stderr, "fromwire_channel_dev_memleak_reply called!\n"); abort(); } { fprintf(stderr, "fromwire_channeld_dev_memleak_reply called!\n"); abort(); }
/* Generated stub for fromwire_channel_got_commitsig */ /* Generated stub for fromwire_channeld_got_commitsig */
bool fromwire_channel_got_commitsig(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, u64 *commitnum UNNEEDED, struct fee_states **fee_states UNNEEDED, struct bitcoin_signature *signature UNNEEDED, struct bitcoin_signature **htlc_signature UNNEEDED, struct added_htlc **added UNNEEDED, struct fulfilled_htlc **fulfilled UNNEEDED, struct failed_htlc ***failed UNNEEDED, struct changed_htlc **changed UNNEEDED, struct bitcoin_tx **tx UNNEEDED) bool fromwire_channeld_got_commitsig(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, u64 *commitnum UNNEEDED, struct fee_states **fee_states UNNEEDED, struct bitcoin_signature *signature UNNEEDED, struct bitcoin_signature **htlc_signature UNNEEDED, struct added_htlc **added UNNEEDED, struct fulfilled_htlc **fulfilled UNNEEDED, struct failed_htlc ***failed UNNEEDED, struct changed_htlc **changed UNNEEDED, struct bitcoin_tx **tx UNNEEDED)
{ fprintf(stderr, "fromwire_channel_got_commitsig called!\n"); abort(); } { fprintf(stderr, "fromwire_channeld_got_commitsig called!\n"); abort(); }
/* Generated stub for fromwire_channel_got_revoke */ /* Generated stub for fromwire_channeld_got_revoke */
bool fromwire_channel_got_revoke(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, u64 *revokenum UNNEEDED, struct secret *per_commitment_secret UNNEEDED, struct pubkey *next_per_commit_point UNNEEDED, struct fee_states **fee_states UNNEEDED, struct changed_htlc **changed UNNEEDED, struct penalty_base **pbase UNNEEDED, struct bitcoin_tx **penalty_tx UNNEEDED) bool fromwire_channeld_got_revoke(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, u64 *revokenum UNNEEDED, struct secret *per_commitment_secret UNNEEDED, struct pubkey *next_per_commit_point UNNEEDED, struct fee_states **fee_states UNNEEDED, struct changed_htlc **changed UNNEEDED, struct penalty_base **pbase UNNEEDED, struct bitcoin_tx **penalty_tx UNNEEDED)
{ fprintf(stderr, "fromwire_channel_got_revoke called!\n"); abort(); } { fprintf(stderr, "fromwire_channeld_got_revoke called!\n"); abort(); }
/* Generated stub for fromwire_channel_offer_htlc_reply */ /* Generated stub for fromwire_channeld_offer_htlc_reply */
bool fromwire_channel_offer_htlc_reply(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, u64 *id UNNEEDED, u8 **failuremsg UNNEEDED, wirestring **failurestr UNNEEDED) bool fromwire_channeld_offer_htlc_reply(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, u64 *id UNNEEDED, u8 **failuremsg UNNEEDED, wirestring **failurestr UNNEEDED)
{ fprintf(stderr, "fromwire_channel_offer_htlc_reply called!\n"); abort(); } { fprintf(stderr, "fromwire_channeld_offer_htlc_reply called!\n"); abort(); }
/* Generated stub for fromwire_channel_sending_commitsig */ /* Generated stub for fromwire_channeld_sending_commitsig */
bool fromwire_channel_sending_commitsig(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, u64 *commitnum UNNEEDED, struct penalty_base **pbase UNNEEDED, struct fee_states **fee_states UNNEEDED, struct changed_htlc **changed UNNEEDED, struct bitcoin_signature *commit_sig UNNEEDED, struct bitcoin_signature **htlc_sigs UNNEEDED) bool fromwire_channeld_sending_commitsig(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, u64 *commitnum UNNEEDED, struct penalty_base **pbase UNNEEDED, struct fee_states **fee_states UNNEEDED, struct changed_htlc **changed UNNEEDED, struct bitcoin_signature *commit_sig UNNEEDED, struct bitcoin_signature **htlc_sigs UNNEEDED)
{ fprintf(stderr, "fromwire_channel_sending_commitsig called!\n"); abort(); } { fprintf(stderr, "fromwire_channeld_sending_commitsig called!\n"); abort(); }
/* Generated stub for fromwire_connect_peer_connected */ /* 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) 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(); } { fprintf(stderr, "fromwire_connect_peer_connected called!\n"); abort(); }
@ -631,39 +631,39 @@ void topology_add_sync_waiter_(const tal_t *ctx UNNEEDED,
void *arg) UNNEEDED, void *arg) UNNEEDED,
void *arg UNNEEDED) void *arg UNNEEDED)
{ fprintf(stderr, "topology_add_sync_waiter_ called!\n"); abort(); } { fprintf(stderr, "topology_add_sync_waiter_ called!\n"); abort(); }
/* Generated stub for towire_channel_dev_memleak */
u8 *towire_channel_dev_memleak(const tal_t *ctx UNNEEDED)
{ fprintf(stderr, "towire_channel_dev_memleak called!\n"); abort(); }
/* Generated stub for towire_channel_dev_reenable_commit */
u8 *towire_channel_dev_reenable_commit(const tal_t *ctx UNNEEDED)
{ fprintf(stderr, "towire_channel_dev_reenable_commit called!\n"); abort(); }
/* Generated stub for towire_channel_disabled */ /* Generated stub for towire_channel_disabled */
u8 *towire_channel_disabled(const tal_t *ctx UNNEEDED) u8 *towire_channel_disabled(const tal_t *ctx UNNEEDED)
{ fprintf(stderr, "towire_channel_disabled called!\n"); abort(); } { fprintf(stderr, "towire_channel_disabled called!\n"); abort(); }
/* Generated stub for towire_channel_fail_htlc */ /* Generated stub for towire_channeld_dev_memleak */
u8 *towire_channel_fail_htlc(const tal_t *ctx UNNEEDED, const struct failed_htlc *failed_htlc UNNEEDED) u8 *towire_channeld_dev_memleak(const tal_t *ctx UNNEEDED)
{ fprintf(stderr, "towire_channel_fail_htlc called!\n"); abort(); } { fprintf(stderr, "towire_channeld_dev_memleak called!\n"); abort(); }
/* Generated stub for towire_channel_fulfill_htlc */ /* Generated stub for towire_channeld_dev_reenable_commit */
u8 *towire_channel_fulfill_htlc(const tal_t *ctx UNNEEDED, const struct fulfilled_htlc *fulfilled_htlc UNNEEDED) u8 *towire_channeld_dev_reenable_commit(const tal_t *ctx UNNEEDED)
{ fprintf(stderr, "towire_channel_fulfill_htlc called!\n"); abort(); } { fprintf(stderr, "towire_channeld_dev_reenable_commit called!\n"); abort(); }
/* Generated stub for towire_channel_got_commitsig_reply */ /* Generated stub for towire_channeld_fail_htlc */
u8 *towire_channel_got_commitsig_reply(const tal_t *ctx UNNEEDED) u8 *towire_channeld_fail_htlc(const tal_t *ctx UNNEEDED, const struct failed_htlc *failed_htlc UNNEEDED)
{ fprintf(stderr, "towire_channel_got_commitsig_reply called!\n"); abort(); } { fprintf(stderr, "towire_channeld_fail_htlc called!\n"); abort(); }
/* Generated stub for towire_channel_got_revoke_reply */ /* Generated stub for towire_channeld_fulfill_htlc */
u8 *towire_channel_got_revoke_reply(const tal_t *ctx UNNEEDED) u8 *towire_channeld_fulfill_htlc(const tal_t *ctx UNNEEDED, const struct fulfilled_htlc *fulfilled_htlc UNNEEDED)
{ fprintf(stderr, "towire_channel_got_revoke_reply called!\n"); abort(); } { fprintf(stderr, "towire_channeld_fulfill_htlc called!\n"); abort(); }
/* Generated stub for towire_channel_offer_htlc */ /* Generated stub for towire_channeld_got_commitsig_reply */
u8 *towire_channel_offer_htlc(const tal_t *ctx UNNEEDED, struct amount_msat amount_msat UNNEEDED, u32 cltv_expiry UNNEEDED, const struct sha256 *payment_hash UNNEEDED, const u8 onion_routing_packet[1366] UNNEEDED, const struct pubkey *blinding UNNEEDED) u8 *towire_channeld_got_commitsig_reply(const tal_t *ctx UNNEEDED)
{ fprintf(stderr, "towire_channel_offer_htlc called!\n"); abort(); } { fprintf(stderr, "towire_channeld_got_commitsig_reply called!\n"); abort(); }
/* Generated stub for towire_channel_send_shutdown */ /* Generated stub for towire_channeld_got_revoke_reply */
u8 *towire_channel_send_shutdown(const tal_t *ctx UNNEEDED, const u8 *shutdown_scriptpubkey UNNEEDED) u8 *towire_channeld_got_revoke_reply(const tal_t *ctx UNNEEDED)
{ fprintf(stderr, "towire_channel_send_shutdown called!\n"); abort(); } { fprintf(stderr, "towire_channeld_got_revoke_reply called!\n"); abort(); }
/* Generated stub for towire_channel_sending_commitsig_reply */ /* Generated stub for towire_channeld_offer_htlc */
u8 *towire_channel_sending_commitsig_reply(const tal_t *ctx UNNEEDED) u8 *towire_channeld_offer_htlc(const tal_t *ctx UNNEEDED, struct amount_msat amount_msat UNNEEDED, u32 cltv_expiry UNNEEDED, const struct sha256 *payment_hash UNNEEDED, const u8 onion_routing_packet[1366] UNNEEDED, const struct pubkey *blinding UNNEEDED)
{ fprintf(stderr, "towire_channel_sending_commitsig_reply called!\n"); abort(); } { fprintf(stderr, "towire_channeld_offer_htlc called!\n"); abort(); }
/* Generated stub for towire_channel_specific_feerates */ /* Generated stub for towire_channeld_send_shutdown */
u8 *towire_channel_specific_feerates(const tal_t *ctx UNNEEDED, u32 feerate_base UNNEEDED, u32 feerate_ppm UNNEEDED) u8 *towire_channeld_send_shutdown(const tal_t *ctx UNNEEDED, const u8 *shutdown_scriptpubkey UNNEEDED)
{ fprintf(stderr, "towire_channel_specific_feerates called!\n"); abort(); } { fprintf(stderr, "towire_channeld_send_shutdown called!\n"); abort(); }
/* Generated stub for towire_channeld_sending_commitsig_reply */
u8 *towire_channeld_sending_commitsig_reply(const tal_t *ctx UNNEEDED)
{ fprintf(stderr, "towire_channeld_sending_commitsig_reply called!\n"); abort(); }
/* Generated stub for towire_channeld_specific_feerates */
u8 *towire_channeld_specific_feerates(const tal_t *ctx UNNEEDED, u32 feerate_base UNNEEDED, u32 feerate_ppm UNNEEDED)
{ fprintf(stderr, "towire_channeld_specific_feerates called!\n"); abort(); }
/* Generated stub for towire_connectctl_connect_to_peer */ /* Generated stub for towire_connectctl_connect_to_peer */
u8 *towire_connectctl_connect_to_peer(const tal_t *ctx UNNEEDED, const struct node_id *id UNNEEDED, u32 seconds_waited UNNEEDED, const struct wireaddr_internal *addrhint UNNEEDED) u8 *towire_connectctl_connect_to_peer(const tal_t *ctx UNNEEDED, const struct node_id *id UNNEEDED, u32 seconds_waited UNNEEDED, const struct wireaddr_internal *addrhint UNNEEDED)
{ fprintf(stderr, "towire_connectctl_connect_to_peer called!\n"); abort(); } { fprintf(stderr, "towire_connectctl_connect_to_peer called!\n"); abort(); }