mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-06 07:34:21 +01:00
Keeping the uintmap ordering all the broadcastable messages is expensive: 130MB for the million-channels project. But now we delete obsolete entries from the store, we can have the per-peer daemons simply read that sequentially and stream the gossip itself. This is the most primitive version, where all gossip is streamed; successive patches will bring back proper handling of timestamp filtering and initial_routing_sync. We add a gossip_state field to track what's happening with our gossip streaming: it's initialized in gossipd, and currently always set, but once we handle timestamps the per-peer daemon may do it when the first filter is sent. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
24 lines
731 B
CSV
24 lines
731 B
CSV
#include <common/per_peer_state.h>
|
|
#include <common/wireaddr.h>
|
|
|
|
# Communication between gossipd and connectd.
|
|
gossip_new_peer,4000
|
|
gossip_new_peer,,id,struct node_id
|
|
# Did we negotiate LOCAL_GOSSIP_QUERIES?
|
|
gossip_new_peer,,gossip_queries_feature,bool
|
|
# Did they offer LOCAL_INITIAL_ROUTING_SYNC?
|
|
gossip_new_peer,,initial_routing_sync,bool
|
|
|
|
# if success: + gossip fd and gossip_store fd
|
|
gossip_new_peer_reply,4100
|
|
gossip_new_peer_reply,,success,bool
|
|
gossip_new_peer_reply,,gs,?struct gossip_state
|
|
|
|
# Connectd asks gossipd for any known addresses for that node.
|
|
gossip_get_addrs,4001
|
|
gossip_get_addrs,,id,struct node_id
|
|
|
|
gossip_get_addrs_reply,4101
|
|
gossip_get_addrs_reply,,num,u16
|
|
gossip_get_addrs_reply,,addrs,num*struct wireaddr
|