routing: dont use InPolicy for blinded paths

We only need the ChannelID, so no need to use the InPolicy which might
be nil.
This commit is contained in:
Elle Mouton 2024-07-31 09:32:46 +02:00
parent 8a14955a0a
commit b271922501
No known key found for this signature in database
GPG Key ID: D7D916376026F177
2 changed files with 3 additions and 3 deletions

View File

@ -1156,7 +1156,7 @@ type blindedPathRestrictions struct {
// path.
type blindedHop struct {
vertex route.Vertex
edgePolicy *models.CachedEdgePolicy
channelID uint64
edgeCapacity btcutil.Amount
}
@ -1296,7 +1296,7 @@ func processNodeForBlindedPath(g Graph, node route.Vertex,
hop := blindedHop{
vertex: channel.OtherNode,
edgePolicy: channel.InPolicy,
channelID: channel.ChannelID,
edgeCapacity: channel.Capacity,
}

View File

@ -722,7 +722,7 @@ func (r *ChannelRouter) FindBlindedPaths(destination route.Vertex,
hops = append(hops, &route.Hop{
PubKeyBytes: path[j].vertex,
ChannelID: path[j-1].edgePolicy.ChannelID,
ChannelID: path[j-1].channelID,
})
prevNode = path[j].vertex