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:
2 files changed
+11
-5
No files matched your search
+2
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user