graph/db: split HasNode into two methods
HasNode currently is very v1 specific since it returns a time.Time timestamp which is specific to V1 node announcements. However, it is mostly only used for the "exists" return value. So here we split it up into HasNode which just checks existence and HasV1Node which retains the same behavaiour as before.
This commit is contained in:
8 files changed
+100
-25
No files matched your search
+1
-1
@@ -874,7 +874,7 @@ func (b *Builder) assertNodeAnnFreshness(ctx context.Context, node route.Vertex,
|
||||
// node announcements, we will ignore such nodes. If we do know about
|
||||
// this node, check that this update brings info newer than what we
|
||||
// already have.
|
||||
lastUpdate, exists, err := b.cfg.Graph.HasNode(ctx, node)
|
||||
lastUpdate, exists, err := b.cfg.Graph.HasV1Node(ctx, node)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to query for the "+
|
||||
"existence of node: %w", err)
|
||||
|
||||
Reference in new issue
Block a user