lnd.xprv/discovery
Olaoluwa Osuntokun 5789ef7c10
discovery: add new gossipSyncer struct to manage sync state for each peer
In this commit, introduce a new struct, the gossipSyncer. The role of
this struct is to encapsulate the state machine required to implement
the new gossip query range feature recently added to the spec. With this
change, each peer that knows of this new feature will have a new
goroutine that will be managed by the gossiper.

Once created and started, the gossipSyncer will start to progress
through each possible state, finally ending at the chansSynced stage. In
this stage, it has synchronized state with the remote peer, and is
simply awaiting any new messages from the gossiper to send directly to
the peer. Each message will only be sent if the remote peer actually has
a set update horizon, and the message isn't before or after that
horizon.

A set of unit tests has been added to ensure that two state machines
properly terminate and synchronize channel state.
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: add new gossipSyncer struct to manage sync state for each peer 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