mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
bbed5e3411
We leave the *build* results in lightningd/ for ease of in-place testing though. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
3.7 KiB
3.7 KiB
1 | # These are fatal. |
---|---|
2 | gossipstatus_init_failed,0x8000 |
3 | gossipstatus_bad_new_peer_request,0x8001 |
4 | gossipstatus_bad_release_request,0x8002 |
5 | gossipstatus_bad_fail_request,0x8003 |
6 | gossipstatus_bad_request,0x8004 |
7 | gossipstatus_fdpass_failed,0x8005 |
8 | # Peers can give a bad message, we close their fd, but no harm done. |
9 | gossipstatus_peer_bad_msg,1000 |
10 | gossipstatus_peer_bad_msg,,unique_id,8 |
11 | gossipstatus_peer_bad_msg,,len,2 |
12 | gossipstatus_peer_bad_msg,,err,len*u8 |
13 | # Misc problems like opening control fd. |
14 | gossipstatus_peer_failed,1001 |
15 | gossipstatus_peer_failed,,unique_id,8 |
16 | gossipstatus_peer_failed,,len,2 |
17 | gossipstatus_peer_failed,,err,len*u8 |
18 | #include <common/cryptomsg.h> |
19 | # Initialize the gossip daemon |
20 | gossipctl_init,0 |
21 | gossipctl_init,,broadcast_interval,4 |
22 | gossipctl_init,,chain_hash,struct sha256_double |
23 | # These take an fd, but have no response |
24 | # (if it is to move onto a channel, we get a status msg). |
25 | gossipctl_new_peer,1 |
26 | gossipctl_new_peer,,unique_id,8 |
27 | gossipctl_new_peer,,crypto_state,struct crypto_state |
28 | # Tell it to release a peer which has initialized. |
29 | gossipctl_release_peer,2 |
30 | gossipctl_release_peer,,unique_id,8 |
31 | # This releases the peer and returns the cryptostate (followed two fds: peer and gossip) |
32 | gossipctl_release_peer_reply,102 |
33 | gossipctl_release_peer_reply,,crypto_state,struct crypto_state |
34 | # This is if we couldn't find the peer. |
35 | gossipctl_release_peer_replyfail,202 |
36 | # This is where we save a peer's features. |
37 | #gossipstatus_peer_features,1 |
38 | #gossipstatus_peer_features,,unique_id,8 |
39 | #gossipstatus_peer_features,,gflen,2 |
40 | #gossipstatus_peer_features,,globalfeatures,gflen |
41 | #gossipstatus_peer_features,,lflen,2 |
42 | #gossipstatus_peer_features,,localfeatures,lflen |
43 | # Peer can send non-gossip packet (usually an open_channel) (followed two fds: peer and gossip) |
44 | gossipstatus_peer_nongossip,4 |
45 | gossipstatus_peer_nongossip,,unique_id,8 |
46 | gossipstatus_peer_nongossip,,crypto_state,struct crypto_state |
47 | gossipstatus_peer_nongossip,,len,2 |
48 | gossipstatus_peer_nongossip,,msg,len*u8 |
49 | # Pass JSON-RPC getnodes call through |
50 | gossip_getnodes_request,5 |
51 | #include <lightningd/gossip_msg.h> |
52 | gossip_getnodes_reply,105 |
53 | gossip_getnodes_reply,,num_nodes,u16 |
54 | gossip_getnodes_reply,,nodes,num_nodes*struct gossip_getnodes_entry |
55 | # Pass JSON-RPC getroute call through |
56 | gossip_getroute_request,6 |
57 | gossip_getroute_request,,source,struct pubkey |
58 | gossip_getroute_request,,destination,struct pubkey |
59 | gossip_getroute_request,,msatoshi,u32 |
60 | gossip_getroute_request,,riskfactor,u16 |
61 | gossip_getroute_reply,106 |
62 | gossip_getroute_reply,,num_hops,u16 |
63 | gossip_getroute_reply,,hops,num_hops*struct route_hop |
64 | gossip_getchannels_request,7 |
65 | gossip_getchannels_reply,107 |
66 | gossip_getchannels_reply,,num_channels,u16 |
67 | gossip_getchannels_reply,,nodes,num_channels*struct gossip_getchannels_entry |
68 | # Ping/pong test. |
69 | gossip_ping,8 |
70 | gossip_ping,,unique_id,u64 |
71 | gossip_ping,,num_pong_bytes,u16 |
72 | gossip_ping,,len,u16 |
73 | gossip_ping_reply,108 |
74 | gossip_ping_reply,,totlen,u16 |
75 | # Given a short_channel_id, return the endpoints |
76 | gossip_resolve_channel_request,9 |
77 | gossip_resolve_channel_request,,channel_id,struct short_channel_id |
78 | gossip_resolve_channel_reply,109 |
79 | gossip_resolve_channel_reply,,num_keys,u16 |
80 | gossip_resolve_channel_reply,,keys,num_keys*struct pubkey |
81 | # The main daemon forward some gossip message to gossipd, allows injecting |
82 | # arbitrary gossip messages. |
83 | gossip_forwarded_msg,10 |
84 | gossip_forwarded_msg,,msglen,2 |
85 | gossip_forwarded_msg,,msg,msglen |
86 | # If peer is still connected, fail it (master does this for reconnect) |
87 | gossipctl_fail_peer,11 |
88 | gossipctl_fail_peer,,unique_id,8 |
89 | # Get a gossip fd for this peer (it has reconnected) |
90 | gossipctl_get_peer_gossipfd,12 |
91 | gossipctl_get_peer_gossipfd,,unique_id,u64 |
92 | # Does it want a full dump of gossip? |
93 | gossipctl_get_peer_gossipfd,,sync,bool |
94 | # + fd. |
95 | gossipctl_get_peer_gossipfd_reply,112 |
96 | # Failure (can't make new socket) |
97 | gossipctl_get_peer_gossipfd_replyfail,212 |