@@ -101,7 +101,7 @@ func TestNodeInsertionAndDeletion(t *testing.T) {
101
101
t .Parallel ()
102
102
ctx := context .Background ()
103
103
104
- graph := MakeTestGraphNew (t )
104
+ graph := MakeTestGraph (t )
105
105
106
106
// We'd like to test basic insertion/deletion for vertexes from the
107
107
// graph, so we'll create a test vertex to start with.
@@ -264,7 +264,7 @@ func TestPartialNode(t *testing.T) {
264
264
t .Parallel ()
265
265
ctx := context .Background ()
266
266
267
- graph := MakeTestGraphNew (t )
267
+ graph := MakeTestGraph (t )
268
268
269
269
// To insert a partial node, we need to add a channel edge that has
270
270
// node keys for nodes we are not yet aware
@@ -332,7 +332,7 @@ func TestAliasLookup(t *testing.T) {
332
332
t .Parallel ()
333
333
ctx := context .Background ()
334
334
335
- graph := MakeTestGraphNew (t )
335
+ graph := MakeTestGraph (t )
336
336
337
337
// We'd like to test the alias index within the database, so first
338
338
// create a new test node.
@@ -363,7 +363,7 @@ func TestSourceNode(t *testing.T) {
363
363
t .Parallel ()
364
364
ctx := context .Background ()
365
365
366
- graph := MakeTestGraphNew (t )
366
+ graph := MakeTestGraph (t )
367
367
368
368
// We'd like to test the setting/getting of the source node, so we
369
369
// first create a fake node to use within the test.
@@ -390,7 +390,7 @@ func TestEdgeInsertionDeletion(t *testing.T) {
390
390
t .Parallel ()
391
391
ctx := context .Background ()
392
392
393
- graph := MakeTestGraphNew (t )
393
+ graph := MakeTestGraph (t )
394
394
395
395
// We'd like to test the insertion/deletion of edges, so we create two
396
396
// vertexes to connect.
@@ -513,7 +513,7 @@ func TestDisconnectBlockAtHeight(t *testing.T) {
513
513
t .Parallel ()
514
514
ctx := context .Background ()
515
515
516
- graph := MakeTestGraphNew (t )
516
+ graph := MakeTestGraph (t )
517
517
518
518
sourceNode := createTestVertex (t )
519
519
if err := graph .SetSourceNode (ctx , sourceNode ); err != nil {
@@ -810,7 +810,7 @@ func TestEdgeInfoUpdates(t *testing.T) {
810
810
t .Parallel ()
811
811
ctx := context .Background ()
812
812
813
- graph := MakeTestGraphNew (t )
813
+ graph := MakeTestGraph (t )
814
814
815
815
// We'd like to test the update of edges inserted into the database, so
816
816
// we create two vertexes to connect.
@@ -1128,7 +1128,7 @@ func TestAddEdgeProof(t *testing.T) {
1128
1128
t .Parallel ()
1129
1129
ctx := context .Background ()
1130
1130
1131
- graph := MakeTestGraphNew (t )
1131
+ graph := MakeTestGraph (t )
1132
1132
1133
1133
// Add an edge with no proof.
1134
1134
node1 := createTestVertex (t )
@@ -1187,7 +1187,7 @@ func TestForEachSourceNodeChannel(t *testing.T) {
1187
1187
t .Parallel ()
1188
1188
ctx := context .Background ()
1189
1189
1190
- graph := MakeTestGraphNew (t )
1190
+ graph := MakeTestGraph (t )
1191
1191
1192
1192
// Create a source node (A) and set it as such in the DB.
1193
1193
nodeA := createTestVertex (t )
@@ -1275,7 +1275,7 @@ func TestForEachSourceNodeChannel(t *testing.T) {
1275
1275
func TestGraphTraversal (t * testing.T ) {
1276
1276
t .Parallel ()
1277
1277
1278
- graph := MakeTestGraphNew (t )
1278
+ graph := MakeTestGraph (t )
1279
1279
1280
1280
// We'd like to test some of the graph traversal capabilities within
1281
1281
// the DB, so we'll create a series of fake nodes to insert into the
@@ -1370,7 +1370,7 @@ func TestGraphTraversal(t *testing.T) {
1370
1370
func TestGraphTraversalCacheable (t * testing.T ) {
1371
1371
t .Parallel ()
1372
1372
1373
- graph := MakeTestGraphNew (t )
1373
+ graph := MakeTestGraph (t )
1374
1374
1375
1375
// We'd like to test some of the graph traversal capabilities within
1376
1376
// the DB, so we'll create a series of fake nodes to insert into the
@@ -1440,7 +1440,7 @@ func TestGraphTraversalCacheable(t *testing.T) {
1440
1440
func TestGraphCacheTraversal (t * testing.T ) {
1441
1441
t .Parallel ()
1442
1442
1443
- graph := MakeTestGraphNew (t )
1443
+ graph := MakeTestGraph (t )
1444
1444
1445
1445
// We'd like to test some of the graph traversal capabilities within
1446
1446
// the DB, so we'll create a series of fake nodes to insert into the
@@ -1685,7 +1685,7 @@ func TestGraphPruning(t *testing.T) {
1685
1685
t .Parallel ()
1686
1686
ctx := context .Background ()
1687
1687
1688
- graph := MakeTestGraphNew (t )
1688
+ graph := MakeTestGraph (t )
1689
1689
1690
1690
sourceNode := createTestVertex (t )
1691
1691
if err := graph .SetSourceNode (ctx , sourceNode ); err != nil {
@@ -1875,7 +1875,7 @@ func TestHighestChanID(t *testing.T) {
1875
1875
t .Parallel ()
1876
1876
ctx := context .Background ()
1877
1877
1878
- graph := MakeTestGraphNew (t )
1878
+ graph := MakeTestGraph (t )
1879
1879
1880
1880
// If we don't yet have any channels in the database, then we should
1881
1881
// get a channel ID of zero if we ask for the highest channel ID.
@@ -1935,7 +1935,7 @@ func TestChanUpdatesInHorizon(t *testing.T) {
1935
1935
t .Parallel ()
1936
1936
ctx := context .Background ()
1937
1937
1938
- graph := MakeTestGraphNew (t )
1938
+ graph := MakeTestGraph (t )
1939
1939
1940
1940
// If we issue an arbitrary query before any channel updates are
1941
1941
// inserted in the database, we should get zero results.
@@ -2093,7 +2093,7 @@ func TestNodeUpdatesInHorizon(t *testing.T) {
2093
2093
t .Parallel ()
2094
2094
ctx := context .Background ()
2095
2095
2096
- graph := MakeTestGraphNew (t )
2096
+ graph := MakeTestGraph (t )
2097
2097
2098
2098
startTime := time .Unix (1234 , 0 )
2099
2099
endTime := startTime
@@ -2196,7 +2196,7 @@ func TestNodeUpdatesInHorizon(t *testing.T) {
2196
2196
func TestFilterKnownChanIDsZombieRevival (t * testing.T ) {
2197
2197
t .Parallel ()
2198
2198
2199
- graph := MakeTestGraphNew (t )
2199
+ graph := MakeTestGraph (t )
2200
2200
2201
2201
var (
2202
2202
scid1 = lnwire.ShortChannelID {BlockHeight : 1 }
@@ -2262,7 +2262,7 @@ func TestFilterKnownChanIDs(t *testing.T) {
2262
2262
t .Parallel ()
2263
2263
ctx := context .Background ()
2264
2264
2265
- graph := MakeTestGraphNew (t )
2265
+ graph := MakeTestGraph (t )
2266
2266
2267
2267
isZombieUpdate := func (updateTime1 time.Time ,
2268
2268
updateTime2 time.Time ) bool {
@@ -2440,7 +2440,7 @@ func TestStressTestChannelGraphAPI(t *testing.T) {
2440
2440
t .Parallel ()
2441
2441
ctx := context .Background ()
2442
2442
2443
- graph := MakeTestGraphNew (t )
2443
+ graph := MakeTestGraph (t )
2444
2444
2445
2445
node1 := createTestVertex (t )
2446
2446
require .NoError (t , graph .AddLightningNode (ctx , node1 ))
@@ -2729,7 +2729,7 @@ func TestFilterChannelRange(t *testing.T) {
2729
2729
t .Parallel ()
2730
2730
ctx := context .Background ()
2731
2731
2732
- graph := MakeTestGraphNew (t )
2732
+ graph := MakeTestGraph (t )
2733
2733
2734
2734
// We'll first populate our graph with two nodes. All channels created
2735
2735
// below will be made between these two nodes.
@@ -2948,7 +2948,7 @@ func TestFetchChanInfos(t *testing.T) {
2948
2948
t .Parallel ()
2949
2949
ctx := context .Background ()
2950
2950
2951
- graph := MakeTestGraphNew (t )
2951
+ graph := MakeTestGraph (t )
2952
2952
2953
2953
// We'll first populate our graph with two nodes. All channels created
2954
2954
// below will be made between these two nodes.
@@ -3051,7 +3051,7 @@ func TestIncompleteChannelPolicies(t *testing.T) {
3051
3051
t .Parallel ()
3052
3052
ctx := context .Background ()
3053
3053
3054
- graph := MakeTestGraphNew (t )
3054
+ graph := MakeTestGraph (t )
3055
3055
3056
3056
// Create two nodes.
3057
3057
node1 := createTestVertex (t )
@@ -3147,7 +3147,7 @@ func TestChannelEdgePruningUpdateIndexDeletion(t *testing.T) {
3147
3147
t .Parallel ()
3148
3148
ctx := context .Background ()
3149
3149
3150
- graph := MakeTestGraphNew (t )
3150
+ graph := MakeTestGraph (t )
3151
3151
3152
3152
// The update index only applies to the bbolt graph.
3153
3153
boltStore , ok := graph .V1Store .(* KVStore )
@@ -3295,7 +3295,7 @@ func TestPruneGraphNodes(t *testing.T) {
3295
3295
t .Parallel ()
3296
3296
ctx := context .Background ()
3297
3297
3298
- graph := MakeTestGraphNew (t )
3298
+ graph := MakeTestGraph (t )
3299
3299
3300
3300
// We'll start off by inserting our source node, to ensure that it's
3301
3301
// the only node left after we prune the graph.
@@ -3361,7 +3361,7 @@ func TestAddChannelEdgeShellNodes(t *testing.T) {
3361
3361
t .Parallel ()
3362
3362
ctx := context .Background ()
3363
3363
3364
- graph := MakeTestGraphNew (t )
3364
+ graph := MakeTestGraph (t )
3365
3365
3366
3366
// To start, we'll create two nodes, and only add one of them to the
3367
3367
// channel graph.
@@ -3400,7 +3400,7 @@ func TestNodePruningUpdateIndexDeletion(t *testing.T) {
3400
3400
t .Parallel ()
3401
3401
ctx := context .Background ()
3402
3402
3403
- graph := MakeTestGraphNew (t )
3403
+ graph := MakeTestGraph (t )
3404
3404
3405
3405
// We'll first populate our graph with a single node that will be
3406
3406
// removed shortly.
@@ -3469,19 +3469,19 @@ func TestNodeIsPublic(t *testing.T) {
3469
3469
// We'll need to create a separate database and channel graph for each
3470
3470
// participant to replicate real-world scenarios (private edges being in
3471
3471
// some graphs but not others, etc.).
3472
- aliceGraph := MakeTestGraphNew (t )
3472
+ aliceGraph := MakeTestGraph (t )
3473
3473
aliceNode := createTestVertex (t )
3474
3474
if err := aliceGraph .SetSourceNode (ctx , aliceNode ); err != nil {
3475
3475
t .Fatalf ("unable to set source node: %v" , err )
3476
3476
}
3477
3477
3478
- bobGraph := MakeTestGraphNew (t )
3478
+ bobGraph := MakeTestGraph (t )
3479
3479
bobNode := createTestVertex (t )
3480
3480
if err := bobGraph .SetSourceNode (ctx , bobNode ); err != nil {
3481
3481
t .Fatalf ("unable to set source node: %v" , err )
3482
3482
}
3483
3483
3484
- carolGraph := MakeTestGraphNew (t )
3484
+ carolGraph := MakeTestGraph (t )
3485
3485
carolNode := createTestVertex (t )
3486
3486
if err := carolGraph .SetSourceNode (ctx , carolNode ); err != nil {
3487
3487
t .Fatalf ("unable to set source node: %v" , err )
@@ -3596,7 +3596,7 @@ func TestDisabledChannelIDs(t *testing.T) {
3596
3596
t .Parallel ()
3597
3597
ctx := context .Background ()
3598
3598
3599
- graph := MakeTestGraphNew (t )
3599
+ graph := MakeTestGraph (t )
3600
3600
3601
3601
// Create first node and add it to the graph.
3602
3602
node1 := createTestVertex (t )
@@ -3681,7 +3681,7 @@ func TestEdgePolicyMissingMaxHtcl(t *testing.T) {
3681
3681
t .Parallel ()
3682
3682
ctx := context .Background ()
3683
3683
3684
- graph := MakeTestGraphNew (t )
3684
+ graph := MakeTestGraph (t )
3685
3685
3686
3686
// This test currently directly edits the bytes stored in the bbolt DB.
3687
3687
boltStore , ok := graph .V1Store .(* KVStore )
@@ -3828,7 +3828,7 @@ func TestGraphZombieIndex(t *testing.T) {
3828
3828
ctx := context .Background ()
3829
3829
3830
3830
// We'll start by creating our test graph along with a test edge.
3831
- graph := MakeTestGraphNew (t )
3831
+ graph := MakeTestGraph (t )
3832
3832
3833
3833
node1 := createTestVertex (t )
3834
3834
node2 := createTestVertex (t )
@@ -4010,7 +4010,7 @@ func TestBatchedAddChannelEdge(t *testing.T) {
4010
4010
t .Parallel ()
4011
4011
ctx := context .Background ()
4012
4012
4013
- graph := MakeTestGraphNew (t )
4013
+ graph := MakeTestGraph (t )
4014
4014
4015
4015
sourceNode := createTestVertex (t )
4016
4016
require .Nil (t , graph .SetSourceNode (ctx , sourceNode ))
@@ -4087,7 +4087,7 @@ func TestBatchedUpdateEdgePolicy(t *testing.T) {
4087
4087
t .Parallel ()
4088
4088
ctx := context .Background ()
4089
4089
4090
- graph := MakeTestGraphNew (t )
4090
+ graph := MakeTestGraph (t )
4091
4091
4092
4092
// We'd like to test the update of edges inserted into the database, so
4093
4093
// we create two vertexes to connect.
@@ -4137,7 +4137,7 @@ func TestBatchedUpdateEdgePolicy(t *testing.T) {
4137
4137
// BenchmarkForEachChannel is a benchmark test that measures the number of
4138
4138
// allocations and the total memory consumed by the full graph traversal.
4139
4139
func BenchmarkForEachChannel (b * testing.B ) {
4140
- graph := MakeTestGraphNew (b )
4140
+ graph := MakeTestGraph (b )
4141
4141
4142
4142
const numNodes = 100
4143
4143
const numChannels = 4
@@ -4190,7 +4190,7 @@ func TestGraphCacheForEachNodeChannel(t *testing.T) {
4190
4190
t .Parallel ()
4191
4191
ctx := context .Background ()
4192
4192
4193
- graph := MakeTestGraphNew (t )
4193
+ graph := MakeTestGraph (t )
4194
4194
4195
4195
// Unset the channel graph cache to simulate the user running with the
4196
4196
// option turned off.
@@ -4325,7 +4325,7 @@ func TestGraphLoading(t *testing.T) {
4325
4325
func TestClosedScid (t * testing.T ) {
4326
4326
t .Parallel ()
4327
4327
4328
- graph := MakeTestGraphNew (t )
4328
+ graph := MakeTestGraph (t )
4329
4329
4330
4330
scid := lnwire.ShortChannelID {}
4331
4331
@@ -4362,7 +4362,7 @@ func TestLightningNodePersistence(t *testing.T) {
4362
4362
ctx := context .Background ()
4363
4363
4364
4364
// Create a new test graph instance.
4365
- graph := MakeTestGraphNew (t )
4365
+ graph := MakeTestGraph (t )
4366
4366
4367
4367
nodeAnnBytes , err := hex .DecodeString (testNodeAnn )
4368
4368
require .NoError (t , err )
0 commit comments