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
2019-12-13 16:07:53 -08:00
parent 66ff2c1e7a
commit 1f781ea431
2 changed files with 11 additions and 5 deletions

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