Skip to content

Commit db84032

Browse files
committed
localchans: bugfix so that we always use the correct chanID
1 parent 415a526 commit db84032

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

routing/localchans/manager.go

+9-1
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,16 @@ func (r *Manager) createEdge(channel *channeldb.OpenChannel,
311311
err)
312312
}
313313

314+
// We need to make sure we use the real scid for public confirmed
315+
// zero-conf channels.
316+
shortChanID := channel.ShortChanID()
317+
isPublic := channel.ChannelFlags&lnwire.FFAnnounceChannel != 0
318+
if isPublic && channel.IsZeroConf() && channel.ZeroConfConfirmed() {
319+
shortChanID = channel.ZeroConfRealScid()
320+
}
321+
314322
info := &models.ChannelEdgeInfo{
315-
ChannelID: channel.ShortChanID().ToUint64(),
323+
ChannelID: shortChanID.ToUint64(),
316324
ChainHash: channel.ChainHash,
317325
Features: featureBuf.Bytes(),
318326
Capacity: channel.Capacity,

0 commit comments

Comments
 (0)