mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-07 11:22:10 +02:00
discovery: set GossipSyncer update horizon to current time
With the introduction of the gossip sync manager in a later commit, retrieving the backlog of updates within the last hour is no longer necessary as we'll be forcing full syncs periodically.
This commit is contained in:
@@ -437,13 +437,7 @@ func (g *GossipSyncer) channelGraphSyncer() {
|
|||||||
// we want to receive real-time channel updates, we'll
|
// we want to receive real-time channel updates, we'll
|
||||||
// do so now.
|
// do so now.
|
||||||
if g.localUpdateHorizon == nil && syncType == ActiveSync {
|
if g.localUpdateHorizon == nil && syncType == ActiveSync {
|
||||||
// TODO(roasbeef): query DB for most recent
|
updateHorizon := time.Now()
|
||||||
// update?
|
|
||||||
|
|
||||||
// We'll give an hours room in our update
|
|
||||||
// horizon to ensure we don't miss any newer
|
|
||||||
// items.
|
|
||||||
updateHorizon := time.Now().Add(-time.Hour * 1)
|
|
||||||
log.Infof("GossipSyncer(%x): applying "+
|
log.Infof("GossipSyncer(%x): applying "+
|
||||||
"gossipFilter(start=%v)",
|
"gossipFilter(start=%v)",
|
||||||
g.cfg.peerPub[:], updateHorizon)
|
g.cfg.peerPub[:], updateHorizon)
|
||||||
|
Reference in New Issue
Block a user