routing: use self instead of source node for creating unified policy
A unified policy differs between local channels and other channels on the network. There is more information available for local channels and this is used in the unified policy. Previously we used the pathfinding source pubkey to determine whether to apply the local channel logic or not. If queryroutes is executed with a source node that isn't the self node, this wouldn't work.
This commit is contained in:
parent
97344af8f3
commit
9ae014edf6
@ -617,7 +617,7 @@ func findPath(g *graphParams, r *RestrictParams, cfg *PathFindingConfig,
|
||||
pivot := partialPath.node
|
||||
|
||||
// Create unified policies for all incoming connections.
|
||||
u := newUnifiedPolicies(source, pivot, r.OutgoingChannelID)
|
||||
u := newUnifiedPolicies(self, pivot, r.OutgoingChannelID)
|
||||
|
||||
err := u.addGraphPolicies(g.graph, tx)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user