graphdb: pass context to IsPublicNode
This commit is contained in:
8 files changed
+26
-18
No files matched your search
+8
-4
@@ -652,8 +652,10 @@ func (c *ChannelGraph) HasV1Node(ctx context.Context,
|
||||
}
|
||||
|
||||
// IsPublicNode determines whether the node is seen as public in the graph.
|
||||
func (c *ChannelGraph) IsPublicNode(pubKey [33]byte) (bool, error) {
|
||||
return c.db.IsPublicNode(lnwire.GossipVersion1, pubKey)
|
||||
func (c *ChannelGraph) IsPublicNode(ctx context.Context,
|
||||
pubKey [33]byte) (bool, error) {
|
||||
|
||||
return c.db.IsPublicNode(ctx, lnwire.GossipVersion1, pubKey)
|
||||
}
|
||||
|
||||
// ForEachChannel iterates through all channel edges stored within the graph.
|
||||
@@ -993,8 +995,10 @@ func (c *VersionedGraph) ChannelID(ctx context.Context,
|
||||
}
|
||||
|
||||
// IsPublicNode determines whether the node is seen as public in the graph.
|
||||
func (c *VersionedGraph) IsPublicNode(pubKey [33]byte) (bool, error) {
|
||||
return c.db.IsPublicNode(c.v, pubKey)
|
||||
func (c *VersionedGraph) IsPublicNode(ctx context.Context,
|
||||
pubKey [33]byte) (bool, error) {
|
||||
|
||||
return c.db.IsPublicNode(ctx, c.v, pubKey)
|
||||
}
|
||||
|
||||
// MakeTestGraph creates a new instance of the ChannelGraph for testing
|
||||
|
||||
Reference in new issue
Block a user