mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-01-18 21:35:24 +01:00
lntest: nil check edges
This commit is contained in:
parent
0876173c45
commit
90ed0fe54c
@ -255,10 +255,10 @@ func (h *HarnessTest) AssertNumActiveEdges(hn *node.HarnessNode,
|
||||
// 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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user