graph/db: thread context through to SetSourceNode
This commit is contained in:
11 files changed
+49
-32
No files matched your search
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user