diff --git a/routing/localchans/manager.go b/routing/localchans/manager.go index cd9e58fcaa..a106291410 100644 --- a/routing/localchans/manager.go +++ b/routing/localchans/manager.go @@ -311,8 +311,16 @@ func (r *Manager) createEdge(channel *channeldb.OpenChannel, err) } + // We need to make sure we use the real scid for public confirmed + // zero-conf channels. + shortChanID := channel.ShortChanID() + isPublic := channel.ChannelFlags&lnwire.FFAnnounceChannel != 0 + if isPublic && 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,