lnd.xprv/discovery
Olaoluwa Osuntokun 45bd544f11
discovery: update AuthenticatedGossiper to be aware of new gossipSyncers
In this commit, we update the logic in the AuthenticatedGossiper to
ensure that can properly create, manage, and dispatch messages to any
gossipSyncer instances created by the server.

With this set of changes, the gossip now has complete knowledge of the
current set of peers we're conneted to that support the new range
queries. Upon initial connect, InitSyncState will be called by the
server if the new peer understands the set of gossip queries. This will
then create a new spot in the peerSyncers map for the new syncer. For
each new gossip query message, we'll then attempt to dispatch the
message directly to the gossip syncer. When the peer has disconnected,
we then expect the server to call the PruneSyncState method which will
allow us to free up the resources.

Finally, when we go to broadcast messages, we'll send the messages
directly to the peers that have gossipSyncer instances active, so they
can properly be filtered out. For those that don't we'll broadcast
directly, ensuring we skip *all* peers that have an active gossip
syncer.
2018-05-31 16:30:53 -07:00
..
ann_validation.go discovery: update graph API usage to match recent API changes 2018-02-06 20:14:32 -08:00
bootstrapper.go discovery: ensure target host for DNS fallback is fully qualified 2018-03-18 16:05:10 -07:00
gossiper_test.go multi: fix typos in comments 2018-04-17 19:03:27 -07:00
gossiper.go discovery: update AuthenticatedGossiper to be aware of new gossipSyncers 2018-05-31 16:30:53 -07:00
log.go lnd: remove seelog logger 2017-06-25 14:19:56 +01:00
syncer_test.go discovery: add new gossipSyncer struct to manage sync state for each peer 2018-05-31 16:30:53 -07:00
syncer.go discovery: add new gossipSyncer struct to manage sync state for each peer 2018-05-31 16:30:53 -07:00
utils.go discovery: update graph API usage to match recent API changes 2018-02-06 20:14:32 -08:00