graph/db: convert other node CRUD methods
Convert a few more CRUD methods to handle v2 nodes. Then update some more tests to be run against both v1 and v2 nodes.
This commit is contained in:
7 files changed
+82
-63
No files matched your search
@@ -132,7 +132,7 @@ func createTestCtxFromGraphInstanceAssumeValid(t *testing.T,
|
||||
)
|
||||
require.NoError(t, err)
|
||||
|
||||
sourceNode, err := graphInstance.graph.SourceNode(t.Context())
|
||||
sourceNode, err := graphInstance.v1Graph.SourceNode(t.Context())
|
||||
require.NoError(t, err)
|
||||
sessionSource := &SessionSource{
|
||||
GraphSessionFactory: graphInstance.graph,
|
||||
@@ -1205,7 +1205,7 @@ func TestFindPathFeeWeighting(t *testing.T) {
|
||||
var preImage [32]byte
|
||||
copy(preImage[:], bytes.Repeat([]byte{9}, 32))
|
||||
|
||||
sourceNode, err := ctx.graph.SourceNode(t.Context())
|
||||
sourceNode, err := ctx.v1Graph.SourceNode(t.Context())
|
||||
require.NoError(t, err, "unable to fetch source node")
|
||||
|
||||
amt := lnwire.MilliSatoshi(100)
|
||||
@@ -1216,7 +1216,7 @@ func TestFindPathFeeWeighting(t *testing.T) {
|
||||
// the edge weighting, we should select the direct path over the 2 hop
|
||||
// path even though the direct path has a higher potential time lock.
|
||||
path, err := dbFindPath(
|
||||
ctx.graph, nil, &mockBandwidthHints{},
|
||||
ctx.v1Graph, nil, &mockBandwidthHints{},
|
||||
noRestrictions,
|
||||
testPathFindingConfig,
|
||||
sourceNode.PubKeyBytes, target, amt, 0, 0,
|
||||
|
||||
Reference in new issue
Block a user