@@ -513,7 +513,7 @@ func TestDisconnectBlockAtHeight(t *testing.T) {
513513 t .Parallel ()
514514 ctx := context .Background ()
515515
516- graph := MakeTestGraph (t )
516+ graph := MakeTestGraphNew (t )
517517
518518 sourceNode := createTestVertex (t )
519519 if err := graph .SetSourceNode (ctx , sourceNode ); err != nil {
@@ -1685,7 +1685,7 @@ func TestGraphPruning(t *testing.T) {
16851685 t .Parallel ()
16861686 ctx := context .Background ()
16871687
1688- graph := MakeTestGraph (t )
1688+ graph := MakeTestGraphNew (t )
16891689
16901690 sourceNode := createTestVertex (t )
16911691 if err := graph .SetSourceNode (ctx , sourceNode ); err != nil {
@@ -2440,14 +2440,18 @@ func TestStressTestChannelGraphAPI(t *testing.T) {
24402440 t .Parallel ()
24412441 ctx := context .Background ()
24422442
2443- graph := MakeTestGraph (t )
2443+ graph := MakeTestGraphNew (t )
24442444
24452445 node1 := createTestVertex (t )
24462446 require .NoError (t , graph .AddLightningNode (ctx , node1 ))
24472447
24482448 node2 := createTestVertex (t )
24492449 require .NoError (t , graph .AddLightningNode (ctx , node2 ))
24502450
2451+ // We need to update the node's timestamp since this call to
2452+ // SetSourceNode will trigger an upsert which will only be allowed if
2453+ // the newest LastUpdate time is greater than the current one.
2454+ node1 .LastUpdate = node1 .LastUpdate .Add (time .Second )
24512455 require .NoError (t , graph .SetSourceNode (ctx , node1 ))
24522456
24532457 type chanInfo struct {
@@ -3291,7 +3295,7 @@ func TestPruneGraphNodes(t *testing.T) {
32913295 t .Parallel ()
32923296 ctx := context .Background ()
32933297
3294- graph := MakeTestGraph (t )
3298+ graph := MakeTestGraphNew (t )
32953299
32963300 // We'll start off by inserting our source node, to ensure that it's
32973301 // the only node left after we prune the graph.
@@ -4006,7 +4010,7 @@ func TestBatchedAddChannelEdge(t *testing.T) {
40064010 t .Parallel ()
40074011 ctx := context .Background ()
40084012
4009- graph := MakeTestGraph (t )
4013+ graph := MakeTestGraphNew (t )
40104014
40114015 sourceNode := createTestVertex (t )
40124016 require .Nil (t , graph .SetSourceNode (ctx , sourceNode ))
0 commit comments