diff --git a/channeldb/graph.go b/channeldb/graph.go index 498f54cfcd..8c9022eeb6 100644 --- a/channeldb/graph.go +++ b/channeldb/graph.go @@ -1871,7 +1871,7 @@ func (c *ChannelGraph) HighestChanID() (uint64, error) { if err != nil { return err } - isOurChannel := selfNode.pubKey.IsEqual(pk1) || selfNode.pubKey.IsEqual(pk2) + isOurChannel := pk1 != nil && selfNode.pubKey.IsEqual(pk1) || pk2 != nil && selfNode.pubKey.IsEqual(pk2) if !aliasmgr.IsAlias(id) && !isOurChannel { cid = id.ToUint64() break