graph/db: thread context through to HasLightningNode
This commit is contained in:
12 files changed
+31
-28
No files matched your search
@@ -2443,7 +2443,7 @@ func (d *AuthenticatedGossiper) handleNodeAnnouncement(ctx context.Context,
|
||||
|
||||
// We'll quickly ask the router if it already has a newer update for
|
||||
// this node so we can skip validating signatures if not required.
|
||||
if d.cfg.Graph.IsStaleNode(nodeAnn.NodeID, timestamp) {
|
||||
if d.cfg.Graph.IsStaleNode(ctx, nodeAnn.NodeID, timestamp) {
|
||||
log.Debugf("Skipped processing stale node: %x", nodeAnn.NodeID)
|
||||
nMsg.err <- nil
|
||||
return nil, true
|
||||
|
||||
@@ -308,7 +308,9 @@ func (r *mockGraphSource) FetchLightningNode(_ context.Context,
|
||||
|
||||
// IsStaleNode returns true if the graph source has a node announcement for the
|
||||
// target node with a more recent timestamp.
|
||||
func (r *mockGraphSource) IsStaleNode(nodePub route.Vertex, timestamp time.Time) bool {
|
||||
func (r *mockGraphSource) IsStaleNode(_ context.Context,
|
||||
nodePub route.Vertex, timestamp time.Time) bool {
|
||||
|
||||
r.mu.Lock()
|
||||
defer r.mu.Unlock()
|
||||
|
||||
|
||||
Reference in new issue
Block a user