From 06d039bc1011b3b6d8dca57db030a62d5b106bd4 Mon Sep 17 00:00:00 2001 From: Roei Erez Date: Sun, 16 Oct 2022 23:21:41 +0300 Subject: [PATCH] use exported function to get the self node public key --- channeldb/graph.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/channeldb/graph.go b/channeldb/graph.go index 8c9022eeb6..561ff92c24 100644 --- a/channeldb/graph.go +++ b/channeldb/graph.go @@ -1871,7 +1871,11 @@ func (c *ChannelGraph) HighestChanID() (uint64, error) { if err != nil { return err } - isOurChannel := pk1 != nil && selfNode.pubKey.IsEqual(pk1) || pk2 != nil && selfNode.pubKey.IsEqual(pk2) + selfPubkey, err := selfNode.PubKey() + if err != nil { + return err + } + isOurChannel := pk1 != nil && selfPubkey.IsEqual(pk1) || pk2 != nil && selfPubkey.IsEqual(pk2) if !aliasmgr.IsAlias(id) && !isOurChannel { cid = id.ToUint64() break