diff --git a/routing/router.go b/routing/router.go index 1775d08e..5f7c1631 100644 --- a/routing/router.go +++ b/routing/router.go @@ -831,6 +831,8 @@ func (r *ChannelRouter) syncChannelGraph(syncReq *syncRequest) error { chanID = lnwire.NewChanIDFromInt(e1.ChannelID) case e2 != nil: chanID = lnwire.NewChanIDFromInt(e2.ChannelID) + case e1 == nil && e2 == nil: + return nil default: chanID = lnwire.NewChanIDFromInt(e1.ChannelID) } diff --git a/rpcserver.go b/rpcserver.go index 23aa2ba7..95de1dc2 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -1601,6 +1601,8 @@ func (r *rpcServer) GetNetworkInfo(context.Context, *lnrpc.NetworkInfoRequest) ( chanCapacity = c2.Capacity case c2 == nil: chanCapacity = c1.Capacity + case c1 == nil && c2 == nil: + return nil default: chanCapacity = c1.Capacity }