From 76fb9af662a91c2fb6dea17474c259900ddadb3b Mon Sep 17 00:00:00 2001 From: ziggie Date: Thu, 19 Dec 2024 18:10:04 +0100 Subject: [PATCH] localchans: bugfix so that we always use the correct chanID --- routing/localchans/manager.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/routing/localchans/manager.go b/routing/localchans/manager.go index cd9e58fcaa..af52b8cfa4 100644 --- a/routing/localchans/manager.go +++ b/routing/localchans/manager.go @@ -311,8 +311,14 @@ func (r *Manager) createEdge(channel *channeldb.OpenChannel, err) } + // We need to make sure we use the real scid for zero-conf channels. + shortChanID := channel.ShortChanID() + if channel.IsZeroConf() && channel.ZeroConfConfirmed() { + shortChanID = channel.ZeroConfRealScid() + } + info := &models.ChannelEdgeInfo{ - ChannelID: channel.ShortChanID().ToUint64(), + ChannelID: shortChanID.ToUint64(), ChainHash: channel.ChainHash, Features: featureBuf.Bytes(), Capacity: channel.Capacity,