mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-10 07:42:39 +02:00
routing/test: use fixed identifiers in test graph
This commit is contained in:
@@ -11,6 +11,11 @@ import (
|
||||
"github.com/lightningnetwork/lnd/routing/route"
|
||||
)
|
||||
|
||||
const (
|
||||
sourceNodeID = 1
|
||||
targetNodeID = 2
|
||||
)
|
||||
|
||||
// integratedRoutingContext defines the context in which integrated routing
|
||||
// tests run.
|
||||
type integratedRoutingContext struct {
|
||||
@@ -31,8 +36,8 @@ type integratedRoutingContext struct {
|
||||
// context with a source and a target node.
|
||||
func newIntegratedRoutingContext(t *testing.T) *integratedRoutingContext {
|
||||
// Instantiate a mock graph.
|
||||
source := newMockNode()
|
||||
target := newMockNode()
|
||||
source := newMockNode(sourceNodeID)
|
||||
target := newMockNode(targetNodeID)
|
||||
|
||||
graph := newMockGraph(t)
|
||||
graph.addNode(source)
|
||||
|
Reference in New Issue
Block a user