mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
gossip: Add message types to store gossip msgs and associate data
Since we may want to extend the on-disk format by adding custom information we may as well just go the extra mile and reuse the serialization primitives we already have. Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
parent
1b6db5fd52
commit
0a5ea76d77
@ -2080,6 +2080,10 @@ static struct io_plan *recv_req(struct io_conn *conn, struct daemon_conn *master
|
||||
case WIRE_GOSSIP_GET_TXOUT:
|
||||
case WIRE_GOSSIPCTL_PEER_DISCONNECT_REPLY:
|
||||
case WIRE_GOSSIPCTL_PEER_DISCONNECT_REPLYFAIL:
|
||||
/* gossip_store messages */
|
||||
case WIRE_GOSSIP_STORE_CHANNEL_ANNOUNCEMENT:
|
||||
case WIRE_GOSSIP_STORE_CHANNEL_UPDATE:
|
||||
case WIRE_GOSSIP_STORE_NODE_ANNOUNCEMENT:
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -224,3 +224,18 @@ gossipctl_peer_disconnect_reply,3123
|
||||
# Gossipd -> master: reply to gossip_peer_disconnect if we couldn't find the peer.
|
||||
gossipctl_peer_disconnect_replyfail,3223
|
||||
gossipctl_peer_disconnect_replyfail,,isconnected,bool
|
||||
|
||||
|
||||
# gossip_store messages: messages persisted in the gossip_store
|
||||
gossip_store_channel_announcement,4096
|
||||
gossip_store_channel_announcement,,len,u16
|
||||
gossip_store_channel_announcement,,announcement,len*u8
|
||||
gossip_store_channel_announcement,,satoshis,u64
|
||||
|
||||
gossip_store_channel_update,4097
|
||||
gossip_store_channel_update,,len,u16
|
||||
gossip_store_channel_update,,update,len*u8
|
||||
|
||||
gossip_store_node_announcement,4098
|
||||
gossip_store_node_announcement,,len,u16
|
||||
gossip_store_node_announcement,,announcement,len*u8
|
||||
|
|
@ -147,6 +147,10 @@ static unsigned gossip_msg(struct subd *gossip, const u8 *msg, const int *fds)
|
||||
case WIRE_GOSSIPCTL_RELEASE_PEER_REPLYFAIL:
|
||||
case WIRE_GOSSIPCTL_PEER_DISCONNECT_REPLY:
|
||||
case WIRE_GOSSIPCTL_PEER_DISCONNECT_REPLYFAIL:
|
||||
/* gossip_store messages */
|
||||
case WIRE_GOSSIP_STORE_CHANNEL_ANNOUNCEMENT:
|
||||
case WIRE_GOSSIP_STORE_CHANNEL_UPDATE:
|
||||
case WIRE_GOSSIP_STORE_NODE_ANNOUNCEMENT:
|
||||
break;
|
||||
/* These are inter-daemon messages, not received by us */
|
||||
case WIRE_GOSSIP_LOCAL_ADD_CHANNEL:
|
||||
|
Loading…
Reference in New Issue
Block a user