discovery: use inclusive range in FilterChannelRange

FilterChannelRange takes an inclusive range, so it was possible for us
to return channels for an additional block that was not requested.
This commit is contained in:
Wilmer Paulino committed 2020-01-06 14:00:14 -08:00
1 parent 66ff2c1e7a
commit 1f781ea431
2 files changed
+11 -5

No files matched your search

+2 -1
View File
@@ -814,8 +814,9 @@ func (g *GossipSyncer) replyChanRangeQuery(query *lnwire.QueryChannelRange) erro
// Next, we'll consult the time series to obtain the set of known
// channel ID's that match their query.
startBlock := query.FirstBlockHeight
endBlock := startBlock + query.NumBlocks - 1
channelRange, err := g.cfg.channelSeries.FilterChannelRange(
query.ChainHash, startBlock, startBlock+query.NumBlocks,
query.ChainHash, startBlock, endBlock,
)
if err != nil {
return err