mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
58d0cc12c4
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
3.5 KiB
3.5 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,dev_gossip_time,?u32, |
12 | msgdata,gossipd_init,dev_fast_gossip,bool, |
13 | msgdata,gossipd_init,dev_fast_gossip_prune,bool, |
14 | # Gossipd tells us all our public channel_updates before init_reply. |
15 | msgtype,gossipd_init_cupdate,3101 |
16 | msgdata,gossipd_init_cupdate,scid,short_channel_id, |
17 | msgdata,gossipd_init_cupdate,len,u16, |
18 | msgdata,gossipd_init_cupdate,cupdate,u8,len |
19 | # Gossipd tells us our node_announcement before init_reply. |
20 | msgtype,gossipd_init_nannounce,3102 |
21 | msgdata,gossipd_init_nannounce,len,u16, |
22 | msgdata,gossipd_init_nannounce,nannounce,u8,len |
23 | msgtype,gossipd_init_reply,3100 |
24 | # In developer mode, we can mess with time. |
25 | msgtype,gossipd_dev_set_time,3001 |
26 | msgdata,gossipd_dev_set_time,dev_gossip_time,u32, |
27 | # Set artificial maximum reply_channel_range size. Master->gossipd |
28 | msgtype,gossipd_dev_set_max_scids_encode_size,3030 |
29 | msgdata,gossipd_dev_set_max_scids_encode_size,max,u32, |
30 | # Gossipd->master get this tx output please. |
31 | msgtype,gossipd_get_txout,3018 |
32 | msgdata,gossipd_get_txout,short_channel_id,short_channel_id, |
33 | # master->gossipd here is the output, or empty if none. |
34 | msgtype,gossipd_get_txout_reply,3118 |
35 | msgdata,gossipd_get_txout_reply,short_channel_id,short_channel_id, |
36 | msgdata,gossipd_get_txout_reply,satoshis,amount_sat, |
37 | msgdata,gossipd_get_txout_reply,len,u16, |
38 | msgdata,gossipd_get_txout_reply,outscript,u8,len |
39 | # master -> gossipd: these potential funding outpoints were spent, please forget any channels |
40 | msgtype,gossipd_outpoints_spent,3024 |
41 | msgdata,gossipd_outpoints_spent,blockheight,u32, |
42 | msgdata,gossipd_outpoints_spent,len,u32, |
43 | msgdata,gossipd_outpoints_spent,short_channel_id,short_channel_id,len |
44 | # master -> gossipd: do you have a memleak? |
45 | msgtype,gossipd_dev_memleak,3033 |
46 | msgtype,gossipd_dev_memleak_reply,3133 |
47 | msgdata,gossipd_dev_memleak_reply,leak,bool, |
48 | # master -> gossipd: please rewrite the gossip_store |
49 | msgtype,gossipd_dev_compact_store,3034 |
50 | # gossipd -> master: ok |
51 | msgtype,gossipd_dev_compact_store_reply,3134 |
52 | msgdata,gossipd_dev_compact_store_reply,success,bool, |
53 | # master -> gossipd: blockheight increased. |
54 | msgtype,gossipd_new_blockheight,3026 |
55 | msgdata,gossipd_new_blockheight,blockheight,u32, |
56 | # gossipd: got it! |
57 | msgtype,gossipd_new_blockheight_reply,3126 |
58 | # Lightningd tells us to inject a gossip message (for addgossip RPC) |
59 | msgtype,gossipd_addgossip,3044 |
60 | msgdata,gossipd_addgossip,len,u16, |
61 | msgdata,gossipd_addgossip,msg,u8,len |
62 | # Empty string means no problem. |
63 | msgtype,gossipd_addgossip_reply,3144 |
64 | msgdata,gossipd_addgossip_reply,err,wirestring, |
65 | # Lightningd asks gossipd for any known addresses for that node. |
66 | msgtype,gossipd_get_addrs,3050 |
67 | msgdata,gossipd_get_addrs,id,node_id, |
68 | msgtype,gossipd_get_addrs_reply,3150 |
69 | msgdata,gossipd_get_addrs_reply,num,u16, |
70 | msgdata,gossipd_get_addrs_reply,addrs,wireaddr,num |
71 | subtype,peer_update |
72 | subtypedata,peer_update,scid,short_channel_id, |
73 | subtypedata,peer_update,fee_base,u32, |
74 | subtypedata,peer_update,fee_ppm,u32, |
75 | subtypedata,peer_update,cltv_delta,u16, |
76 | subtypedata,peer_update,htlc_minimum_msat,amount_msat, |
77 | subtypedata,peer_update,htlc_maximum_msat,amount_msat, |
78 | # Tell lightningd we received channel update info for a local channel |
79 | msgtype,gossipd_remote_channel_update,3010 |
80 | msgdata,gossipd_remote_channel_update,source_node,?node_id, |
81 | msgdata,gossipd_remote_channel_update,peer_update,peer_update, |