lntest: nil check edges

This commit is contained in:
Elle Mouton
2024-11-18 21:06:06 +02:00
parent 0876173c45
commit 90ed0fe54c
2 changed files with 4 additions and 4 deletions

View File

@@ -312,10 +312,10 @@ func (s *State) updateEdgeStats() {
// filterDisabled is a helper closure that filters out disabled
// channels.
filterDisabled := func(edge *lnrpc.ChannelEdge) bool {
if edge.Node1Policy.Disabled {
if edge.Node1Policy != nil && edge.Node1Policy.Disabled {
return false
}
if edge.Node2Policy.Disabled {
if edge.Node2Policy != nil && edge.Node2Policy.Disabled {
return false
}