multi: rename models.LightningNode to models.Node

This commit is contained in:
Elle Mouton committed 2025-09-03 10:14:35 +02:00
1 parent ea6cc8154f
commit c663a557c4
26 files changed
+212 -214

No files matched your search

+7 -7
View File
@@ -38,7 +38,7 @@ type V1Store interface { //nolint:interfacebloat
// update that node's information. Note that this method is expected to
// only be called to update an already present node from a node
// announcement, or to insert a node found in a channel update.
AddLightningNode(ctx context.Context, node *models.LightningNode,
AddLightningNode(ctx context.Context, node *models.Node,
op ...batch.SchedulerOption) error
// AddrsForNode returns all known addresses for the target node public
@@ -53,7 +53,7 @@ type V1Store interface { //nolint:interfacebloat
// the channel and the channel peer's node information.
ForEachSourceNodeChannel(ctx context.Context,
cb func(chanPoint wire.OutPoint, havePolicy bool,
otherNode *models.LightningNode) error,
otherNode *models.Node) error,
reset func()) error
// ForEachNodeChannel iterates through all channels of the given node,
@@ -87,7 +87,7 @@ type V1Store interface { //nolint:interfacebloat
// graph, executing the passed callback with each node encountered. If
// the callback returns an error, then the transaction is aborted and
// the iteration stops early.
ForEachNode(ctx context.Context, cb func(*models.LightningNode) error,
ForEachNode(ctx context.Context, cb func(*models.Node) error,
reset func()) error
// ForEachNodeCacheable iterates through all the stored vertices/nodes
@@ -110,13 +110,13 @@ type V1Store interface { //nolint:interfacebloat
// by two nodes to quickly determine if they have the same set of up to
// date node announcements.
NodeUpdatesInHorizon(startTime,
endTime time.Time) ([]models.LightningNode, error)
endTime time.Time) ([]models.Node, error)
// FetchLightningNode attempts to look up a target node by its identity
// public key. If the node isn't found in the database, then
// ErrGraphNodeNotFound is returned.
FetchLightningNode(ctx context.Context,
nodePub route.Vertex) (*models.LightningNode, error)
nodePub route.Vertex) (*models.Node, error)
// HasLightningNode determines if the graph has a vertex identified by
// the target node identity public key. If the node exists in the
@@ -327,13 +327,13 @@ type V1Store interface { //nolint:interfacebloat
// treated as the center node within a star-graph. This method may be
// used to kick off a path finding algorithm in order to explore the
// reachability of another node based off the source node.
SourceNode(ctx context.Context) (*models.LightningNode, error)
SourceNode(ctx context.Context) (*models.Node, error)
// SetSourceNode sets the source node within the graph database. The
// source node is to be used as the center of a star-graph within path
// finding algorithms.
SetSourceNode(ctx context.Context,
node *models.LightningNode) error
node *models.Node) error
// PruneTip returns the block height and hash of the latest block that
// has been used to prune channels in the graph. Knowing the "prune tip"