lnd.xprv/discovery
Olaoluwa Osuntokun 6a9b96122d
discovery: properly set FirstBlockHeight and NumBlocks in responses
In this commit we fix in a bug in `lnd` that could cause other
implementations which implement a strict version of the spec to
disconnect when trying to sync their channel graph using the gossip
query feature. Before this commit, we would embed the request to a
`QueryChannelRange` in the response, causing some clients to reject the
response as the `FirstBlockHeight` and `NumBlocks` field would be
identical for each chunk of the response.

In order to remedy this, we now properly set these two fields with each
returned chunk. Note that even after this commit, we keep our existing
behavior surrounding the `Complete` field as is. Otherwise, current
`lnd` clients which rely on this field (rather than the two
aforementioned fields) wouldn't be able to properly detect when a set of
responses to their query was "complete".

Partially fixes #3728.
2019-12-10 17:05:58 -08:00
..
bootstrapper.go discovery: error string lint fixes 2019-09-25 18:42:38 +00:00
chan_series.go multi: move Route to sub-pkg routing/route 2019-04-29 14:52:33 +02:00
gossiper_test.go routing+discovery: extract local channel manager 2019-09-23 13:07:08 +02:00
gossiper.go multi: remove LocalFeatures and GlobalFeatures 2019-11-08 05:32:00 -08:00
log.go multi: init subsystem loggers via build pkg 2018-10-05 13:04:45 +09:00
message_store_test.go discovery/message_store: add gossip message store 2019-02-14 18:29:39 -08:00
message_store.go discovery/message_store: add gossip message store 2019-02-14 18:29:39 -08:00
mock_test.go multi: merge local+global features from remote peer 2019-11-08 05:31:47 -08:00
reliable_sender_test.go multi: move WaitPredicate, WaitNoError, WaitInvariant to lntest/wait 2019-09-19 12:46:29 -07:00
reliable_sender.go discovery,fundingmanager: avoid serialization in NotifyWhenOnline 2019-06-04 16:36:21 -03:00
sync_manager_test.go multi: move WaitPredicate, WaitNoError, WaitInvariant to lntest/wait 2019-09-19 12:46:29 -07:00
sync_manager.go multi: remove dead code 2019-09-10 17:21:59 +02:00
syncer_test.go discovery: properly set FirstBlockHeight and NumBlocks in responses 2019-12-10 17:05:58 -08:00
syncer.go discovery: properly set FirstBlockHeight and NumBlocks in responses 2019-12-10 17:05:58 -08:00
utils.go multi: remove dead code 2019-09-10 17:21:59 +02:00