mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-12-27 09:04:40 +01:00
9bddfc2048
Gossipd didn't actually suppress all gossip, resulting in a flake! Doing it in connectd now makes much more sense. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
4.7 KiB
4.7 KiB
1 | #include <common/cryptomsg.h> |
---|---|
2 | #include <common/features.h> |
3 | #include <common/wireaddr.h> |
4 | #include <wire/peer_wire.h> |
5 | #include <wire/onion_wire.h> |
6 | # Initialize the gossip daemon. |
7 | msgtype,gossipd_init,3000 |
8 | msgdata,gossipd_init,chainparams,chainparams, |
9 | msgdata,gossipd_init,our_features,feature_set, |
10 | msgdata,gossipd_init,id,node_id, |
11 | msgdata,gossipd_init,rgb,u8,3 |
12 | msgdata,gossipd_init,alias,u8,32 |
13 | msgdata,gossipd_init,num_announceable,u16, |
14 | msgdata,gossipd_init,announceable,wireaddr,num_announceable |
15 | msgdata,gossipd_init,dev_gossip_time,?u32, |
16 | msgdata,gossipd_init,dev_fast_gossip,bool, |
17 | msgdata,gossipd_init,dev_fast_gossip_prune,bool, |
18 | msgtype,gossipd_init_reply,3100 |
19 | # In developer mode, we can mess with time. |
20 | msgtype,gossipd_dev_set_time,3001 |
21 | msgdata,gossipd_dev_set_time,dev_gossip_time,u32, |
22 | # Set artificial maximum reply_channel_range size. Master->gossipd |
23 | msgtype,gossipd_dev_set_max_scids_encode_size,3030 |
24 | msgdata,gossipd_dev_set_max_scids_encode_size,max,u32, |
25 | # gossipd->master: we're closing this channel. |
26 | msgtype,gossipd_local_channel_close,3027 |
27 | msgdata,gossipd_local_channel_close,short_channel_id,short_channel_id, |
28 | # Gossipd->master get this tx output please. |
29 | msgtype,gossipd_get_txout,3018 |
30 | msgdata,gossipd_get_txout,short_channel_id,short_channel_id, |
31 | # master->gossipd here is the output, or empty if none. |
32 | msgtype,gossipd_get_txout_reply,3118 |
33 | msgdata,gossipd_get_txout_reply,short_channel_id,short_channel_id, |
34 | msgdata,gossipd_get_txout_reply,satoshis,amount_sat, |
35 | msgdata,gossipd_get_txout_reply,len,u16, |
36 | msgdata,gossipd_get_txout_reply,outscript,u8,len |
37 | # master -> gossipd: a potential funding outpoint was spent, please forget the eventual channel |
38 | msgtype,gossipd_outpoint_spent,3024 |
39 | msgdata,gossipd_outpoint_spent,short_channel_id,short_channel_id, |
40 | # master -> gossipd: do you have a memleak? |
41 | msgtype,gossipd_dev_memleak,3033 |
42 | msgtype,gossipd_dev_memleak_reply,3133 |
43 | msgdata,gossipd_dev_memleak_reply,leak,bool, |
44 | # master -> gossipd: please rewrite the gossip_store |
45 | msgtype,gossipd_dev_compact_store,3034 |
46 | # gossipd -> master: ok |
47 | msgtype,gossipd_dev_compact_store_reply,3134 |
48 | msgdata,gossipd_dev_compact_store_reply,success,bool, |
49 | # master -> gossipd: blockheight increased. |
50 | msgtype,gossipd_new_blockheight,3026 |
51 | msgdata,gossipd_new_blockheight,blockheight,u32, |
52 | # gossipd: got it! |
53 | msgtype,gossipd_new_blockheight_reply,3126 |
54 | # Lightningd tells us to inject a gossip message (for addgossip RPC) |
55 | msgtype,gossipd_addgossip,3044 |
56 | msgdata,gossipd_addgossip,len,u16, |
57 | msgdata,gossipd_addgossip,msg,u8,len |
58 | # Empty string means no problem. |
59 | msgtype,gossipd_addgossip_reply,3144 |
60 | msgdata,gossipd_addgossip_reply,err,wirestring, |
61 | # Updated lease rates available |
62 | msgtype,gossipd_new_lease_rates,3046 |
63 | msgdata,gossipd_new_lease_rates,rates,lease_rates, |
64 | # Lightningd asks gossipd for any known addresses for that node. |
65 | msgtype,gossipd_get_addrs,3050 |
66 | msgdata,gossipd_get_addrs,id,node_id, |
67 | msgtype,gossipd_get_addrs_reply,3150 |
68 | msgdata,gossipd_get_addrs_reply,num,u16, |
69 | msgdata,gossipd_get_addrs_reply,addrs,wireaddr,num |
70 | # Tell master a local channel update (so it can serve errors). |
71 | msgtype,gossipd_got_local_channel_update,3151 |
72 | msgdata,gossipd_got_local_channel_update,scid,short_channel_id, |
73 | msgdata,gossipd_got_local_channel_update,len,u16, |
74 | msgdata,gossipd_got_local_channel_update,channel_update,u8,len |
75 | # Send this channel_update. |
76 | msgtype,gossipd_local_channel_update,3004 |
77 | msgdata,gossipd_local_channel_update,id,node_id, |
78 | msgdata,gossipd_local_channel_update,short_channel_id,short_channel_id, |
79 | msgdata,gossipd_local_channel_update,disable,bool, |
80 | msgdata,gossipd_local_channel_update,cltv_expiry_delta,u16, |
81 | msgdata,gossipd_local_channel_update,htlc_minimum_msat,amount_msat, |
82 | msgdata,gossipd_local_channel_update,fee_base_msat,u32, |
83 | msgdata,gossipd_local_channel_update,fee_proportional_millionths,u32, |
84 | msgdata,gossipd_local_channel_update,htlc_maximum_msat,amount_msat, |
85 | # Send this channel_announcement |
86 | msgtype,gossipd_local_channel_announcement,3006 |
87 | msgdata,gossipd_local_channel_announcement,id,node_id, |
88 | msgdata,gossipd_local_channel_announcement,len,u16, |
89 | msgdata,gossipd_local_channel_announcement,cannounce,u8,len |
90 | # Tell gossipd about a private channel (to put it in the store) |
91 | # cannounce has same structure, dummy sigs. |
92 | msgtype,gossipd_local_private_channel,3008 |
93 | msgdata,gossipd_local_private_channel,id,node_id, |
94 | msgdata,gossipd_local_private_channel,capacity,amount_sat, |
95 | msgdata,gossipd_local_private_channel,scid,short_channel_id, |
96 | msgdata,gossipd_local_private_channel,len,u16, |
97 | msgdata,gossipd_local_private_channel,features,u8,len |
98 | # Tell gossipd we used the channel update (in case it was deferred) |
99 | msgtype,gossipd_used_local_channel_update,3052 |
100 | msgdata,gossipd_used_local_channel_update,scid,short_channel_id, |
101 | # Tell gossipd we have discovered a new remote_addr |
102 | msgtype,gossipd_remote_addr,3009 |
103 | msgdata,gossipd_remote_addr,remote_addr,wireaddr, |