@@ -513,7 +513,7 @@ func TestDisconnectBlockAtHeight(t *testing.T) {
513
513
t .Parallel ()
514
514
ctx := context .Background ()
515
515
516
- graph := MakeTestGraph (t )
516
+ graph := MakeTestGraphNew (t )
517
517
518
518
sourceNode := createTestVertex (t )
519
519
if err := graph .SetSourceNode (ctx , sourceNode ); err != nil {
@@ -1685,7 +1685,7 @@ func TestGraphPruning(t *testing.T) {
1685
1685
t .Parallel ()
1686
1686
ctx := context .Background ()
1687
1687
1688
- graph := MakeTestGraph (t )
1688
+ graph := MakeTestGraphNew (t )
1689
1689
1690
1690
sourceNode := createTestVertex (t )
1691
1691
if err := graph .SetSourceNode (ctx , sourceNode ); err != nil {
@@ -2440,14 +2440,18 @@ func TestStressTestChannelGraphAPI(t *testing.T) {
2440
2440
t .Parallel ()
2441
2441
ctx := context .Background ()
2442
2442
2443
- graph := MakeTestGraph (t )
2443
+ graph := MakeTestGraphNew (t )
2444
2444
2445
2445
node1 := createTestVertex (t )
2446
2446
require .NoError (t , graph .AddLightningNode (ctx , node1 ))
2447
2447
2448
2448
node2 := createTestVertex (t )
2449
2449
require .NoError (t , graph .AddLightningNode (ctx , node2 ))
2450
2450
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 )
2451
2455
require .NoError (t , graph .SetSourceNode (ctx , node1 ))
2452
2456
2453
2457
type chanInfo struct {
@@ -3291,7 +3295,7 @@ func TestPruneGraphNodes(t *testing.T) {
3291
3295
t .Parallel ()
3292
3296
ctx := context .Background ()
3293
3297
3294
- graph := MakeTestGraph (t )
3298
+ graph := MakeTestGraphNew (t )
3295
3299
3296
3300
// We'll start off by inserting our source node, to ensure that it's
3297
3301
// the only node left after we prune the graph.
@@ -4006,7 +4010,7 @@ func TestBatchedAddChannelEdge(t *testing.T) {
4006
4010
t .Parallel ()
4007
4011
ctx := context .Background ()
4008
4012
4009
- graph := MakeTestGraph (t )
4013
+ graph := MakeTestGraphNew (t )
4010
4014
4011
4015
sourceNode := createTestVertex (t )
4012
4016
require .Nil (t , graph .SetSourceNode (ctx , sourceNode ))
0 commit comments