graph/db: thread context through to SetSourceNode

This commit is contained in:
Elle Mouton committed 2025-06-19 14:47:40 +02:00
1 parent e0a9705d59
commit 65049ddd02
11 files changed
+49 -32

No files matched your search

+3 -1
View File
@@ -4,6 +4,7 @@
package peersrpc
import (
"context"
"net"
"github.com/lightningnetwork/lnd/lnwire"
@@ -27,6 +28,7 @@ type Config struct {
// setting the feature vector provided and applying the
// NodeAnnModifiers. If no feature updates are required, a nil feature
// vector should be provided.
UpdateNodeAnnouncement func(features *lnwire.RawFeatureVector,
UpdateNodeAnnouncement func(ctx context.Context,
features *lnwire.RawFeatureVector,
mods ...netann.NodeAnnModifier) error
}
+2 -2
View File
@@ -306,7 +306,7 @@ func (s *Server) updateFeatures(currentfeatures *lnwire.RawFeatureVector,
// UpdateNodeAnnouncement allows the caller to update the node parameters
// and broadcasts a new version of the node announcement to its peers.
func (s *Server) UpdateNodeAnnouncement(_ context.Context,
func (s *Server) UpdateNodeAnnouncement(ctx context.Context,
req *NodeAnnouncementUpdateRequest) (
*NodeAnnouncementUpdateResponse, error) {
@@ -393,7 +393,7 @@ func (s *Server) UpdateNodeAnnouncement(_ context.Context,
}
if err := s.cfg.UpdateNodeAnnouncement(
nodeAnnFeatures, nodeModifiers...,
ctx, nodeAnnFeatures, nodeModifiers...,
); err != nil {
return nil, err
}