mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-07 14:29:33 +01:00
662bb0c565
We used a u16, and a 1000 multiplier, which meant we wrapped at riskfactor 66. We also never undid the multiplier, so we ended up applying 1000x the riskfactor they specified. This changes us to pass the riskfactor with a 1M multiplier. The next patch changes the definition of riskfactor to be more useful. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
5.1 KiB
5.1 KiB
1 | #include <common/cryptomsg.h> |
---|---|
2 | #include <common/wireaddr.h> |
3 | #include <wire/gen_onion_wire.h> |
4 | # Initialize the gossip daemon. |
5 | gossipctl_init,3000 |
6 | gossipctl_init,,broadcast_interval_msec,u32 |
7 | gossipctl_init,,chain_hash,struct bitcoin_blkid |
8 | gossipctl_init,,id,struct pubkey |
9 | gossipctl_init,,gflen,u16 |
10 | gossipctl_init,,globalfeatures,gflen*u8 |
11 | gossipctl_init,,rgb,3*u8 |
12 | gossipctl_init,,alias,32*u8 |
13 | gossipctl_init,,update_channel_interval,u32 |
14 | gossipctl_init,,num_announcable,u16 |
15 | gossipctl_init,,announcable,num_announcable*struct wireaddr |
16 | # Pass JSON-RPC getnodes call through |
17 | gossip_getnodes_request,3005 |
18 | gossip_getnodes_request,,id,?struct pubkey |
19 | #include <lightningd/gossip_msg.h> |
20 | gossip_getnodes_reply,3105 |
21 | gossip_getnodes_reply,,num_nodes,u16 |
22 | gossip_getnodes_reply,,nodes,num_nodes*struct gossip_getnodes_entry |
23 | # Pass JSON-RPC getroute call through |
24 | gossip_getroute_request,3006 |
25 | gossip_getroute_request,,source,struct pubkey |
26 | gossip_getroute_request,,destination,struct pubkey |
27 | gossip_getroute_request,,msatoshi,u64 |
28 | # We don't pass doubles, so pass riskfactor * 1000000. |
29 | gossip_getroute_request,,riskfactor_by_million,u64 |
30 | gossip_getroute_request,,final_cltv,u32 |
31 | gossip_getroute_request,,fuzz,double |
32 | gossip_getroute_request,,num_excluded,u16 |
33 | gossip_getroute_request,,excluded,num_excluded*struct short_channel_id_dir |
34 | gossip_getroute_request,,max_hops,u32 |
35 | gossip_getroute_reply,3106 |
36 | gossip_getroute_reply,,num_hops,u16 |
37 | gossip_getroute_reply,,hops,num_hops*struct route_hop |
38 | gossip_getchannels_request,3007 |
39 | gossip_getchannels_request,,short_channel_id,?struct short_channel_id |
40 | gossip_getchannels_request,,source,?struct pubkey |
41 | gossip_getchannels_reply,3107 |
42 | gossip_getchannels_reply,,num_channels,u16 |
43 | gossip_getchannels_reply,,nodes,num_channels*struct gossip_getchannels_entry |
44 | # Ping/pong test. Waits for a reply if it expects one. |
45 | gossip_ping,3008 |
46 | gossip_ping,,id,struct pubkey |
47 | gossip_ping,,num_pong_bytes,u16 |
48 | gossip_ping,,len,u16 |
49 | gossip_ping_reply,3108 |
50 | gossip_ping_reply,,id,struct pubkey |
51 | # False if id in gossip_ping was unknown. |
52 | gossip_ping_reply,,sent,bool |
53 | # 0 == no pong expected |
54 | gossip_ping_reply,,totlen,u16 |
55 | # Test of query_short_channel_ids. Master->gossipd |
56 | gossip_query_scids,3031 |
57 | gossip_query_scids,,id,struct pubkey |
58 | gossip_query_scids,,num_ids,u16 |
59 | gossip_query_scids,,ids,num_ids*struct short_channel_id |
60 | # Gossipd -> master |
61 | gossip_scids_reply,3131 |
62 | gossip_scids_reply,,ok,bool |
63 | gossip_scids_reply,,complete,bool |
64 | # Test gossip timestamp filtering. |
65 | gossip_send_timestamp_filter,3028 |
66 | gossip_send_timestamp_filter,,id,struct pubkey |
67 | gossip_send_timestamp_filter,,first_timestamp,u32 |
68 | gossip_send_timestamp_filter,,timestamp_range,u32 |
69 | # Test of query_channel_range. Master->gossipd |
70 | gossip_query_channel_range,3029 |
71 | gossip_query_channel_range,,id,struct pubkey |
72 | gossip_query_channel_range,,first_blocknum,u32 |
73 | gossip_query_channel_range,,number_of_blocks,u32 |
74 | # Gossipd -> master |
75 | gossip_query_channel_range_reply,3129 |
76 | gossip_query_channel_range_reply,,final_first_block,u32 |
77 | gossip_query_channel_range_reply,,final_num_blocks,u32 |
78 | gossip_query_channel_range_reply,,final_complete,bool |
79 | gossip_query_channel_range_reply,,num,u16 |
80 | gossip_query_channel_range_reply,,scids,num*struct short_channel_id |
81 | # Set artificial maximum reply_channel_range size. Master->gossipd |
82 | gossip_dev_set_max_scids_encode_size,3030 |
83 | gossip_dev_set_max_scids_encode_size,,max,u32 |
84 | # Given a short_channel_id, return the other endpoint (or none if DNE) |
85 | gossip_get_channel_peer,3009 |
86 | gossip_get_channel_peer,,channel_id,struct short_channel_id |
87 | gossip_get_channel_peer_reply,3109 |
88 | gossip_get_channel_peer_reply,,peer_id,?struct pubkey |
89 | # gossipd->master: we're closing this channel. |
90 | gossip_local_channel_close,3027 |
91 | gossip_local_channel_close,,short_channel_id,struct short_channel_id |
92 | # Gossipd->master get this tx output please. |
93 | gossip_get_txout,3018 |
94 | gossip_get_txout,,short_channel_id,struct short_channel_id |
95 | # master->gossipd here is the output, or empty if none. |
96 | gossip_get_txout_reply,3118 |
97 | gossip_get_txout_reply,,short_channel_id,struct short_channel_id |
98 | gossip_get_txout_reply,,satoshis,u64 |
99 | gossip_get_txout_reply,,len,u16 |
100 | gossip_get_txout_reply,,outscript,len*u8 |
101 | # master->gossipd an htlc failed with this onion error. |
102 | gossip_payment_failure,3021 |
103 | gossip_payment_failure,,erring_node,struct pubkey |
104 | gossip_payment_failure,,erring_channel,struct short_channel_id |
105 | gossip_payment_failure,,erring_channel_direction,u8 |
106 | gossip_payment_failure,,len,u16 |
107 | gossip_payment_failure,,error,len*u8 |
108 | # master -> gossipd: a potential funding outpoint was spent, please forget the eventual channel |
109 | gossip_outpoint_spent,3024 |
110 | gossip_outpoint_spent,,short_channel_id,struct short_channel_id |
111 | # master -> gossipd: stop gossip timers. |
112 | gossip_dev_suppress,3032 |
113 | # master -> gossipd: do you have a memleak? |
114 | gossip_dev_memleak,3033 |
115 | gossip_dev_memleak_reply,3133 |
116 | gossip_dev_memleak_reply,,leak,bool |
117 | #include <common/bolt11.h> |
118 | # master -> gossipd: get route_info for our incoming channels |
119 | gossip_get_incoming_channels,3025 |
120 | gossip_get_incoming_channels,,private_too,?bool |
121 | # gossipd -> master: here they are. |
122 | gossip_get_incoming_channels_reply,3125 |
123 | gossip_get_incoming_channels_reply,,num,u16 |
124 | gossip_get_incoming_channels_reply,,route_info,num*struct route_info |