Skip to content

Commit b271922

Browse files
committed
routing: dont use InPolicy for blinded paths
We only need the ChannelID, so no need to use the InPolicy which might be nil.
1 parent 8a14955 commit b271922

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

routing/pathfind.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,7 +1156,7 @@ type blindedPathRestrictions struct {
11561156
// path.
11571157
type blindedHop struct {
11581158
vertex route.Vertex
1159-
edgePolicy *models.CachedEdgePolicy
1159+
channelID uint64
11601160
edgeCapacity btcutil.Amount
11611161
}
11621162

@@ -1296,7 +1296,7 @@ func processNodeForBlindedPath(g Graph, node route.Vertex,
12961296

12971297
hop := blindedHop{
12981298
vertex: channel.OtherNode,
1299-
edgePolicy: channel.InPolicy,
1299+
channelID: channel.ChannelID,
13001300
edgeCapacity: channel.Capacity,
13011301
}
13021302

routing/router.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@ func (r *ChannelRouter) FindBlindedPaths(destination route.Vertex,
722722

723723
hops = append(hops, &route.Hop{
724724
PubKeyBytes: path[j].vertex,
725-
ChannelID: path[j-1].edgePolicy.ChannelID,
725+
ChannelID: path[j-1].channelID,
726726
})
727727

728728
prevNode = path[j].vertex

0 commit comments

Comments
 (0)