discovery: start sending timestamps if requested

This commit is contained in:
Elle Mouton
2023-09-20 10:44:11 +02:00
parent 0ad4ef373a
commit 67df687f08
3 changed files with 35 additions and 7 deletions

View File

@@ -43,8 +43,8 @@ type ChannelGraphTimeSeries interface {
// between the start height and the end height. The channel IDs are
// grouped by their common block height. We'll use this to to a remote
// peer's QueryChannelRange message.
FilterChannelRange(chain chainhash.Hash,
startHeight, endHeight uint32) ([]channeldb.BlockChannelRange, error)
FilterChannelRange(chain chainhash.Hash, startHeight, endHeight uint32,
withTimestamps bool) ([]channeldb.BlockChannelRange, error)
// FetchChanAnns returns a full set of channel announcements as well as
// their updates that match the set of specified short channel ID's.
@@ -226,10 +226,13 @@ func (c *ChanSeries) FilterKnownChanIDs(chain chainhash.Hash,
// message.
//
// NOTE: This is part of the ChannelGraphTimeSeries interface.
func (c *ChanSeries) FilterChannelRange(chain chainhash.Hash,
startHeight, endHeight uint32) ([]channeldb.BlockChannelRange, error) {
func (c *ChanSeries) FilterChannelRange(_ chainhash.Hash, startHeight,
endHeight uint32, withTimestamps bool) ([]channeldb.BlockChannelRange,
error) {
return c.graph.FilterChannelRange(startHeight, endHeight, false)
return c.graph.FilterChannelRange(
startHeight, endHeight, withTimestamps,
)
}
// FetchChanAnns returns a full set of channel announcements as well as their