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
+3
-3
@@ -704,7 +704,7 @@ func (r *rpcServer) addDeps(ctx context.Context, s *server,
|
||||
invoiceHtlcModifier *invoices.HtlcModificationInterceptor) error {
|
||||
|
||||
// Set up router rpc backend.
|
||||
selfNode, err := s.graphDB.SourceNode(ctx)
|
||||
selfNode, err := s.v1Graph.SourceNode(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -4995,7 +4995,7 @@ func createRPCOpenChannel(ctx context.Context, r *rpcServer,
|
||||
|
||||
// Look up our channel peer's node alias if the caller requests it.
|
||||
if peerAliasLookup {
|
||||
peerAlias, err := r.server.graphDB.LookupAlias(ctx, nodePub)
|
||||
peerAlias, err := r.server.v1Graph.LookupAlias(ctx, nodePub)
|
||||
if err != nil {
|
||||
peerAlias = fmt.Sprintf("unable to lookup "+
|
||||
"peer alias: %v", err)
|
||||
@@ -7909,7 +7909,7 @@ const feeBase float64 = 1000000
|
||||
func (r *rpcServer) FeeReport(ctx context.Context,
|
||||
_ *lnrpc.FeeReportRequest) (*lnrpc.FeeReportResponse, error) {
|
||||
|
||||
channelGraph := r.server.graphDB
|
||||
channelGraph := r.server.v1Graph
|
||||
selfNode, err := channelGraph.SourceNode(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in new issue
Block a user