lnrpc+routing: fix issues with missing data in unmarshallRoute
In this commit the dependency of unmarshallRoute on edge policies being available is removed. Edge policies may be unknown and reported as nil. SendToRoute does not need the policies, but it does need pubkeys of the route hops. In this commit, unmarshallRoute is modified so that it takes the pubkeys from edgeInfo instead of channelEdgePolicy. In addition to this, the route structure is simplified. No more connection to the database at that point. Fees are determined based on incoming and outgoing amounts.
This commit is contained in:
6 files changed
+269
-276
No files matched your search
+2
-2
@@ -78,9 +78,9 @@ type path struct {
|
||||
// that the path requires.
|
||||
dist int
|
||||
|
||||
// hops is an ordered list of edge that comprises a potential payment
|
||||
// hops is an ordered list of edges that comprises a potential payment
|
||||
// path.
|
||||
hops []*ChannelHop
|
||||
hops []*channeldb.ChannelEdgePolicy
|
||||
}
|
||||
|
||||
// pathHeap is a min-heap that stores potential paths to be considered within
|
||||
|
||||
Reference in new issue
Block a user